[][src]Struct actori::io::FramedWrite

pub struct FramedWrite<T: AsyncWrite + Unpin, U: Encoder> { /* fields omitted */ }

A wrapper for the AsyncWrite and Encoder types. The AsyncWrite will be flushed when this struct is dropped.

Methods

impl<T: AsyncWrite + Unpin, U: Encoder> FramedWrite<T, U>[src]

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

pub fn from_buffer<A, C>(io: T, enc: U, buffer: BytesMut, ctx: &mut C) -> Self where
    A: Actor<Context = C> + WriteHandler<U::Error>,
    C: AsyncContext<A>,
    U::Error: 'static,
    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: usize, high: usize)[src]

Sets the write buffer capacity.

pub fn write(&mut self, item: U::Item)[src]

Writes an item to the sink.

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

Returns the SpawnHandle for this writer.

Trait Implementations

impl<T: AsyncWrite + Unpin, U: Encoder> Drop for FramedWrite<T, U>[src]

Auto Trait Implementations

impl<T, U> !RefUnwindSafe for FramedWrite<T, U>

impl<T, U> !Send for FramedWrite<T, U>

impl<T, U> !Sync for FramedWrite<T, U>

impl<T, U> Unpin for FramedWrite<T, U> where
    U: Unpin

impl<T, U> !UnwindSafe for FramedWrite<T, U>

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>,