Skip to main content

SegmentReader

Trait SegmentReader 

Source
pub trait SegmentReader:
    Read
    + Seek
    + Send {
    // Provided method
    fn segment_len(&mut self) -> Result<u64> { ... }
}
Expand description

Reader type accepted by Image::open_readers.

Implemented automatically for any Read + Seek + Send type. Override SegmentReader::segment_len when obtaining the length by seeking to the end is not appropriate.

Provided Methods§

Source

fn segment_len(&mut self) -> Result<u64>

Returns the total length of this segment in bytes.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> SegmentReader for T
where T: Read + Seek + Send,