Trait winter_utils::Randomizable[][src]

pub trait Randomizable: Sized {
    const VALUE_SIZE: usize;

    fn from_random_bytes(source: &[u8]) -> Option<Self>;
}
Expand description

Defines how Self can be read from a sequence of random bytes.

Associated Constants

Size of Self in bytes.

This is used to determine how many bytes should be passed to the from_random_bytes() function.

Required methods

Returns Self if the set of bytes forms a valid value, otherwise returns None.

Implementations on Foreign Types

Implementors