pub trait FromBytes {
const MIN_SIZE_OF: usize;
const ALIGN_OF: usize;
// Required method
unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>;
}Expand description
Converts from a byte slice to a string.
Required Associated Constants§
Required Methods§
Sourceunsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
unsafe fn from_bytes(bytes: &[u8]) -> Option<&Self>
Converts from a byte slice to a string.
§Safety
The given byte slice must have the minimum size and alignment as specified.
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.