pub trait LengthLimitedRead: Read {
// Required method
fn remaining_bytes(&self) -> u64;
}Expand description
A io::Read that limits the amount of bytes that can be read. Implementations should ensure
that the object being read will only consume a fixed number of bytes from the underlying
io::Read, see FixedLengthReader for an example.
Required Methods§
Sourcefn remaining_bytes(&self) -> u64
fn remaining_bytes(&self) -> u64
The number of bytes remaining to be read.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.