pub trait ByteIteratorCallback {
// Required method
fn call(&mut self, iter: impl Iterator<Item = u8>);
}
Expand description
Callback for byte iteration.
We can’t return different types from the iterate_bytes
and Fn traits don’t support associated types
that’s why we use a callback with a generic function.
Required Methods§
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.