pub trait SeekableStream:
AsyncRead
+ Unpin
+ Debug
+ Send
+ Sync
+ DynClone {
// Required methods
fn reset<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn len(&self) -> usize;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn buffer_size(&self) -> usize { ... }
}Expand description
Enable a type implementing AsyncRead to be consumed as if it were
a Stream of Bytes.
Required Methods§
fn reset<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn len(&self) -> usize
Provided Methods§
Trait Implementations§
Source§impl From<Box<dyn SeekableStream>> for Body
Available on non-WebAssembly only.
impl From<Box<dyn SeekableStream>> for Body
Available on non-WebAssembly only.
Source§fn from(seekable_stream: Box<dyn SeekableStream>) -> Self
fn from(seekable_stream: Box<dyn SeekableStream>) -> Self
Converts to this type from the input type.
Source§impl Stream for dyn SeekableStream
impl Stream for dyn SeekableStream
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".