Struct actix::io::FramedWrite [−][src]
A wrapper for the AsyncWrite
and Encoder
types. The AsyncWrite will be flushed when this
struct is dropped.
Implementations
impl<I, T: AsyncWrite + Unpin, U: Encoder<I>> FramedWrite<I, 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]
A: Actor<Context = C> + WriteHandler<U::Error>,
C: AsyncContext<A>,
U::Error: 'static,
T: Unpin + 'static,
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]
A: Actor<Context = C> + WriteHandler<U::Error>,
C: AsyncContext<A>,
U::Error: 'static,
T: Unpin + 'static,
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: I)
[src]
Writes an item to the sink.
pub fn handle(&self) -> SpawnHandle
[src]
Returns the SpawnHandle
for this writer.
Trait Implementations
impl<I, T: AsyncWrite + Unpin, U: Encoder<I>> Drop for FramedWrite<I, T, U>
[src]
Auto Trait Implementations
impl<I, T, U> !RefUnwindSafe for FramedWrite<I, T, U>
impl<I, T, U> !Send for FramedWrite<I, T, U>
impl<I, T, U> !Sync for FramedWrite<I, T, U>
impl<I, T, U> Unpin for FramedWrite<I, T, U> where
U: Unpin,
U: Unpin,
impl<I, T, U> !UnwindSafe for FramedWrite<I, T, U>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,