Skip to main content

BadLength

Trait BadLength 

Source
pub trait BadLength {
    // Required method
    fn bad_length(found: usize, expected: usize) -> Self;
}
Expand description

Trait implemented by error types used by DeserializableSlice::from_slice. The method is called when the given slice is shorter than the required size.

Required Methods§

Source

fn bad_length(found: usize, expected: usize) -> Self

Invoked when a buffer of bad length is given to DeserializableSlice::from_slice.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§