pub trait Bytes32: Sized {
// Required method
fn to_bytes32(&self) -> [u8; 32];
// Provided method
fn to_vec(&self) -> Vec<u8> ⓘ { ... }
}
Expand description
Trait for converting type to bytes32.
Required Methods§
Sourcefn to_bytes32(&self) -> [u8; 32]
fn to_bytes32(&self) -> [u8; 32]
Convert type to the lowest significant bytes 32.
Provided 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.