[][src]Struct actix::io::Writer

pub struct Writer<T: AsyncWrite, E: From<Error>> { /* fields omitted */ }

A wrapper for AsyncWrite types.

Implementations

impl<T: AsyncWrite, E: From<Error> + 'static> Writer<T, E>[src]

pub fn new<A, C>(io: T, ctx: &mut C) -> Self where
    A: Actor<Context = C> + WriteHandler<E>,
    C: AsyncContext<A>,
    T: Unpin + 'static, 
[src]

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 set_buffer_capacity(
    &mut self,
    low_watermark: usize,
    high_watermark: usize
)
[src]

Sets the write buffer capacity.

pub fn write(&mut self, msg: &[u8])[src]

Sends an item to the sink.

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

Returns the SpawnHandle for this writer.

Auto Trait Implementations

impl<T, E> !RefUnwindSafe for Writer<T, E>

impl<T, E> !Send for Writer<T, E>

impl<T, E> !Sync for Writer<T, E>

impl<T, E> Unpin for Writer<T, E>

impl<T, E> !UnwindSafe for Writer<T, E>

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.

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