Skip to main content

ByteSource

Trait ByteSource 

Source
pub trait ByteSource {
    // Required methods
    fn len(&self) -> Option<u64>;
    fn read_at<'a>(
        &'a self,
        offset: u64,
        destination: &'a mut [u8],
    ) -> IoFuture<'a, usize>;

    // Provided method
    fn is_empty(&self) -> Option<bool> { ... }
}
Expand description

An asynchronous random-access byte source.

Required Methods§

Source

fn len(&self) -> Option<u64>

Source

fn read_at<'a>( &'a self, offset: u64, destination: &'a mut [u8], ) -> IoFuture<'a, usize>

Provided Methods§

Source

fn is_empty(&self) -> Option<bool>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§