[][src]Struct body_image_futio::AsyncBodySink

#[must_use = "sinks do nothing unless polled"]pub struct AsyncBodySink<B, BA = LenientArbiter> where
    B: InputBuf,
    BA: BlockingArbiter + Default + Unpin
{ /* fields omitted */ }

Adaptor for BodySink, implementing the futures::Sink trait.

This allows a hyper::Body or any AsyncBodyStream to be forwarded (e.g. via futures::Stream::forward) to a BodySink, in a fully asynchronous fashion.

FutioTunables are used during the streaming to decide when to write back a BodySink in Ram to FsWrite.

See also DispatchBodySink and PermitBodySink which provide additional coordination of blocking operations.

Implementations

impl<B, BA> AsyncBodySink<B, BA> where
    B: InputBuf,
    BA: BlockingArbiter + Default + Unpin
[src]

pub fn new(body: BodySink, tune: FutioTunables) -> Self[src]

Wrap by consuming a BodySink and FutioTunables instances.

Note: FutioTunables is Clone (inexpensive), so that can be done beforehand to preserve an owned copy.

pub fn into_inner(self) -> BodySink[src]

Unwrap and return the BodySink.

Trait Implementations

impl<B: Debug, BA: Debug> Debug for AsyncBodySink<B, BA> where
    B: InputBuf,
    BA: BlockingArbiter + Default + Unpin
[src]

impl<B, BA> Sink<B> for AsyncBodySink<B, BA> where
    B: InputBuf,
    BA: BlockingArbiter + Default + Unpin
[src]

type Error = FutioError

The type of value produced by the sink when an error occurs.

impl<B, BA> SinkWrapper<B> for AsyncBodySink<B, BA> where
    B: InputBuf,
    BA: BlockingArbiter + Default + Unpin
[src]

Auto Trait Implementations

impl<B, BA = LenientArbiter> !RefUnwindSafe for AsyncBodySink<B, BA>[src]

impl<B, BA> Send for AsyncBodySink<B, BA> where
    BA: Send
[src]

impl<B, BA> Sync for AsyncBodySink<B, BA> where
    BA: Sync
[src]

impl<B, BA> Unpin for AsyncBodySink<B, BA>[src]

impl<B, BA = LenientArbiter> !UnwindSafe for AsyncBodySink<B, BA>[src]

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> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[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>,