Trait azure_core::SeekableStream

source ·
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§

source

fn reset<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn len(&self) -> usize

Provided Methods§

source

fn is_empty(&self) -> bool

source

fn buffer_size(&self) -> usize

Trait Implementations§

source§

impl Stream for dyn SeekableStream

§

type Item = Result<Bytes, Error>

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more

Implementors§