Trait mp4san::Skip

source ·
pub trait Skip {
    // Required methods
    fn skip(&mut self, amount: u64) -> Result<(), Error>;
    fn stream_position(&mut self) -> Result<u64, Error>;
    fn stream_len(&mut self) -> Result<u64, Error>;
}
Expand description

A subset of the [Seek] trait, providing a cursor which can skip forward within a stream of bytes.

Required Methods§

source

fn skip(&mut self, amount: u64) -> Result<(), Error>

Skip an amount of bytes in a stream.

A skip beyond the end of a stream is allowed, but behavior is defined by the implementation.

source

fn stream_position(&mut self) -> Result<u64, Error>

Returns the current position of the cursor from the start of the stream.

source

fn stream_len(&mut self) -> Result<u64, Error>

Returns the length of this stream, in bytes.

Implementations on Foreign Types§

source§

impl Skip for &File

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

source§

fn stream_position(&mut self) -> Result<u64, Error>

source§

fn stream_len(&mut self) -> Result<u64, Error>

source§

impl Skip for File

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

source§

fn stream_position(&mut self) -> Result<u64, Error>

source§

fn stream_len(&mut self) -> Result<u64, Error>

source§

impl Skip for Empty

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

source§

fn stream_position(&mut self) -> Result<u64, Error>

source§

fn stream_len(&mut self) -> Result<u64, Error>

source§

impl<T> Skip for &mut T
where T: Skip + ?Sized,

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

source§

fn stream_position(&mut self) -> Result<u64, Error>

source§

fn stream_len(&mut self) -> Result<u64, Error>

source§

impl<T> Skip for Box<T>
where T: Skip + ?Sized,

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

source§

fn stream_position(&mut self) -> Result<u64, Error>

source§

fn stream_len(&mut self) -> Result<u64, Error>

source§

impl<T> Skip for BufReader<T>
where T: Read + Skip + ?Sized,

source§

fn stream_position(&mut self) -> Result<u64, Error>

Return the stream position for a BufReader implementing Read + Skip.

source§

fn stream_len(&mut self) -> Result<u64, Error>

Return the stream length for a BufReader implementing Read + Skip.

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

source§

impl<T> Skip for Cursor<T>
where T: AsRef<[u8]>,

source§

fn skip(&mut self, amount: u64) -> Result<(), Error>

source§

fn stream_position(&mut self) -> Result<u64, Error>

source§

fn stream_len(&mut self) -> Result<u64, Error>

Implementors§

source§

impl<T> Skip for SeekSkipAdapter<T>
where T: Seek,