Struct actix::io::SinkWrite[][src]

pub struct SinkWrite<I, S: Sink<I> + Unpin> { /* fields omitted */ }

A wrapper for the Sink type.

Implementations

impl<I: 'static, S: Sink<I> + Unpin + 'static> SinkWrite<I, S>[src]

pub fn new<A, C>(sink: S, ctxt: &mut C) -> Self where
    A: Actor<Context = C> + WriteHandler<S::Error>,
    C: AsyncContext<A>, 
[src]

pub fn write(&mut self, item: I) -> Option<I>[src]

Queues an item to be sent to the sink.

Returns unsent item if sink is closing or closed.

pub fn close(&mut self)[src]

Gracefully closes the sink.

The closing happens asynchronously.

pub fn closed(&self) -> bool[src]

Checks if the sink is closed.

pub fn handle(&self) -> SpawnHandle[src]

Returns the SpawnHandle for this writer.

Auto Trait Implementations

impl<I, S> !RefUnwindSafe for SinkWrite<I, S>[src]

impl<I, S> !Send for SinkWrite<I, S>[src]

impl<I, S> !Sync for SinkWrite<I, S>[src]

impl<I, S> Unpin for SinkWrite<I, S>[src]

impl<I, S> !UnwindSafe for SinkWrite<I, S>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.