Skip to main content

ReplaySource

Trait ReplaySource 

pub trait ReplaySource:
    Body<Data = Bytes, Error = Box<dyn Error + Sync + Send>>
    + Send
    + Sync
    + Unpin
    + Any {
    // Required method
    fn clone_cursor(
        &self,
    ) -> Box<dyn ReplaySource<Error = Box<dyn Error + Sync + Send>, Data = Bytes>>;
}
Available on crate features http and std only.
Expand description

A body cursor that can independently replay its remaining data and trailers.

A writer returns a cursor positioned at the start of the completed upload. Report the exact remaining data length through StreamingBody::size_hint.

Required Methods§

fn clone_cursor( &self, ) -> Box<dyn ReplaySource<Error = Box<dyn Error + Sync + Send>, Data = Bytes>>

Clone the current read position. Each cursor owns its progress and keeps the stored payload alive. Start I/O when polled so cloning never blocks.

Trait Implementations§

§

impl Debug for dyn ReplaySource<Error = Box<dyn Error + Sync + Send>, Data = Bytes>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§