Struct futures_shuttle::Shuttle
[−]
[src]
pub struct Shuttle<T> { /* fields omitted */ }
This is created by the shuttle
function.
Methods
impl<T> Shuttle<T>
[src]
pub fn is_mine(&self) -> bool
[src]
Checks this Shuttle
object for being on my side of the track at this time.
pub fn data(&self) -> ShuttleValue<T>
[src]
Access the underlying data item of this Shuttle
. Similar to MutexGuard
.
pub fn send(&self)
[src]
Turns the ownership of this Shuttle
object to the other side of the track.
Panics
Panics if the shuttle is stopped. I.e. there is no other side to send it to.
pub fn try_send(&self) -> Result<(), ShuttleError>
[src]
Attempts to send the shuttle to the other end. If the shuttle is stopped it returns
ShuttleError::Stopped
error.
Trait Implementations
impl<T: Debug> Debug for Shuttle<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Drop for Shuttle<T>
[src]
impl<T> IntoFuture for Shuttle<T>
[src]
type Future = ShuttleWait<T>
The future that this type can be converted into.
type Item = Self
The item that the future may resolve with.
type Error = ShuttleError
The error that the future may resolve with.
fn into_future(self) -> Self::Future
[src]
Consumes this object and produces a future.