[][src]Struct actori::io::SinkWrite

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

A wrapper for the Sink type.

Methods

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) -> Result<(), S::Error>[src]

Sends an item to the sink.

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>

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

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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,