Struct actix::io::SinkWrite [−][src]
A wrapper for the Sink
type.
Implementations
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]
A: Actor<Context = C> + WriteHandler<S::Error>,
C: AsyncContext<A>,
pub fn write(&mut self, item: I) -> Option<I>
[src]
Queues an item to be sent to the sink.
Returns unsent item if sink is closing or closed.
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>
[src]
impl<I, S> !Send for SinkWrite<I, S>
[src]
impl<I, S> !Sync for SinkWrite<I, S>
[src]
impl<I, S> Unpin for SinkWrite<I, S>
[src]
impl<I, S> !UnwindSafe for SinkWrite<I, S>
[src]
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>,