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§
source§impl<A: PartialEq> PartialEq<Action<A>> for Action<A>
impl<A: PartialEq> PartialEq<Action<A>> for Action<A>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more