Trait dusk_bytes::BadLength

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

Trait to be implemented for the associated Error used in [DeserializableSlice::from_slice]. The function is called if the slice given is smaller than the mandatory size for the struct.

Required Methods§

source

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

Invoked when a buffer of bad length is given to [from_slice]

Object Safety§

This trait is not object safe.

Implementors§