pub trait ScannerInput: AsRef<[u8]> + Sized {
// Required methods
fn split_to(&mut self, at: usize) -> Self;
fn finish(&mut self);
}
Expand description
this is a trait which implements the interface of possible inputs (usually byte slices)
Required Methods§
Sourcefn split_to(&mut self, at: usize) -> Self
fn split_to(&mut self, at: usize) -> Self
Splits the input into two at the given index. Afterwards self contains elements [at, len), and the returned input part contains elements [0, at).
fn finish(&mut self)
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.