Skip to main content

SeekSource

Trait SeekSource 

Source
pub trait SeekSource: Source { }
Expand description

A Source that can seek (its seek_to_bit is real, not the failing default). A #[bin] message that uses restore_position bounds its generated decode_from on this trait, so a forward-only stream is rejected at compile time. Implemented by BitReader, BufSource, and SeekReader (and, with the bytes feature, BytesReader).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl SeekSource for BitReader<'_>

Source§

impl<R: Read + Seek> SeekSource for SeekReader<R>

Available on crate feature std only.
Source§

impl<R: Read> SeekSource for BufSource<R>

Available on crate feature std only.