Expand description
A wrapper for the Sink
type.
Implementations
sourceimpl<I: 'static, S: Sink<I> + Unpin + 'static> SinkWrite<I, S>
impl<I: 'static, S: Sink<I> + Unpin + 'static> SinkWrite<I, S>
pub fn new<A, C>(sink: S, ctxt: &mut C) -> Self where
A: Actor<Context = C> + WriteHandler<S::Error>,
C: AsyncContext<A>,
sourcepub fn write(&mut self, item: I) -> Result<(), I>
pub fn write(&mut self, item: I) -> Result<(), I>
Queues an item to be sent to the sink.
Returns unsent item if sink is closing or closed.
sourcepub fn handle(&self) -> SpawnHandle
pub fn handle(&self) -> SpawnHandle
Returns the SpawnHandle
for this writer.
Auto Trait Implementations
impl<I, S> !RefUnwindSafe for SinkWrite<I, S>
impl<I, S> !Send for SinkWrite<I, S>
impl<I, S> !Sync for SinkWrite<I, S>
impl<I, S> Unpin for SinkWrite<I, S>
impl<I, S> !UnwindSafe for SinkWrite<I, S>
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