Add a method to get a handle from a pin

It's store there anyway!
This commit is contained in:
Alex Crichton 2016-08-13 23:00:27 -07:00
parent b508964db6
commit 3158a2c73b

View File

@ -633,6 +633,11 @@ impl LoopPin {
handle: self.handle.clone(), handle: self.handle.clone(),
} }
} }
/// Returns a reference to the underlying handle to the event loop.
pub fn handle(&self) -> &LoopHandle {
&self.handle
}
} }
/// A future which will resolve a unique `tok` token for an I/O object. /// A future which will resolve a unique `tok` token for an I/O object.