Struct asyncio::Strand
[−]
[src]
pub struct Strand<'a, T: 'a> { /* fields omitted */ }
Provides serialized data and handler execution.
Methods
impl<'a, T> Strand<'a, T>
[src]
fn get(&self) -> &mut T
Returns a &mut T
to the memory safely.
fn dispatch<F>(&self, func: F) where F: FnOnce(Strand<T>) + Send + 'static
Request the strand to invoke the given handler.
fn post<F>(&self, func: F) where F: FnOnce(Strand<T>) + Send + 'static
Request the strand to invoke the given handler and return immediately.
fn wrap<F, R, E>(&self, handler: F) -> StrandHandler<T, F, R, E> where F: FnOnce(Strand<T>, Result<R, E>) + Send + 'static, R: Send + 'static
Provides a Strand
handler to asynchronous operation.
The StrandHandler has trait the Handler
, that type of Handler::Output
is ()
.
Trait Implementations
impl<'a, T> AsIoContext for Strand<'a, T>
[src]
impl<'a, T> Deref for Strand<'a, T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<'a, T> DerefMut for Strand<'a, T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value