pub trait Consume<T> {
// Required methods
fn consume(self) -> Result<T>;
fn consume_partial(self) -> Option<T>;
}Expand description
Convenience trait for decoding a value from a byte iterator.
Required Methods§
Sourcefn consume_partial(self) -> Option<T>
fn consume_partial(self) -> Option<T>
Decodes one value from the iterator and allows trailing bytes.
Returns None when the iterator does not contain enough bytes for a
complete value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".