Skip to main content

TreeByteSource

Trait TreeByteSource 

Source
pub trait TreeByteSource {
    // Required methods
    fn read_exact_at(
        &mut self,
        offset: u64,
        buf: &mut [u8],
    ) -> Result<(), TreeStreamError>;
    fn len(&self) -> u64;
    fn integrity(&self) -> TreeBodyIntegrity;
    fn bytes_read(&self) -> u64;

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

Random-access source of an uncompressed canonical tree body.

Required Methods§

Source

fn read_exact_at( &mut self, offset: u64, buf: &mut [u8], ) -> Result<(), TreeStreamError>

Source

fn len(&self) -> u64

Source

fn integrity(&self) -> TreeBodyIntegrity

Source

fn bytes_read(&self) -> u64

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§