pub enum Action<A> {
Send(A),
Flush,
Close,
}
Expand description
The command given to the closure so that it can perform appropriate action.
Presumably the closure encapsulates a resource to perform I/O. The commands
correspond to methods of the Sink
trait and provide the closure with
sufficient information to know what kind of action to perform with it.
Variants
Send(A)
Send the given value.
Corresponds to Sink::start_send
.
Flush
Flush the resource.
Corresponds to Sink::poll_flush
.
Close
Close the resource.
Corresponds to Sink::poll_close
.
Trait Implementations
impl<A: Eq> Eq for Action<A>
impl<A> StructuralEq for Action<A>
impl<A> StructuralPartialEq for Action<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for Action<A> where
A: RefUnwindSafe,
impl<A> Send for Action<A> where
A: Send,
impl<A> Sync for Action<A> where
A: Sync,
impl<A> Unpin for Action<A> where
A: Unpin,
impl<A> UnwindSafe for Action<A> where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more