pub trait Scalar: Copy + Sized {
const WIDTH: usize;
// Required methods
fn from_words(words: &[u32]) -> Option<Self>;
fn write_words(self, words: &mut [u32]) -> Option<()>;
}Expand description
A fixed-width scalar that can be read from and written to little-endian words.
Required Associated Constants§
Required Methods§
Sourcefn from_words(words: &[u32]) -> Option<Self>
fn from_words(words: &[u32]) -> Option<Self>
Decodes from exactly Self::WIDTH words.
Sourcefn write_words(self, words: &mut [u32]) -> Option<()>
fn write_words(self, words: &mut [u32]) -> Option<()>
Encodes into exactly Self::WIDTH words.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".