Struct actix::io::FramedWrite
source · pub struct FramedWrite<T: AsyncWrite, U: Encoder> { /* private fields */ }
Expand description
Wrapper for AsyncWrite
and Encoder
types
Implementations§
source§impl<T: AsyncWrite, U: Encoder> FramedWrite<T, U>
impl<T: AsyncWrite, U: Encoder> FramedWrite<T, U>
pub fn new<A, C>(io: T, enc: U, ctx: &mut C) -> FramedWrite<T, U>where
A: Actor<Context = C> + WriteHandler<U::Error>,
C: AsyncContext<A>,
U::Error: 'static,
T: 'static,
pub fn from_buffer<A, C>(
io: T,
enc: U,
buffer: BytesMut,
ctx: &mut C
) -> FramedWrite<T, U>where
A: Actor<Context = C> + WriteHandler<U::Error>,
C: AsyncContext<A>,
U::Error: 'static,
T: 'static,
sourcepub fn set_buffer_capacity(&mut self, low: usize, high: usize)
pub fn set_buffer_capacity(&mut self, low: usize, high: usize)
Set write buffer capacity
sourcepub fn handle(&self) -> SpawnHandle
pub fn handle(&self) -> SpawnHandle
SpawnHandle
for this writer