[−][src]Trait safe_bytes::SafeBytes
Trait for types that can initialize their padding in their bytes representation.
Safety
This trait's implementation should be able to produce initialized
bytes slice that contain original structure raw
representation.
It is safe to implement it in wrong way.
But it is advised to derive SafeBytes
if possible.
Or implement PaddingBane
instead if deriving is not possible,
as SafeBytes
has blanket implementation for PaddingBane
implementors.
Required methods
fn safe_bytes(&mut self) -> &[u8]
Returns bytes representation of the value, initializing all padding bytes
Implementors
impl<T> SafeBytes for T where
T: PaddingBane,
[src]
T: PaddingBane,
fn safe_bytes(&mut self) -> &[u8]
[src]
impl<T> SafeBytes for [T] where
T: PaddingBane,
[src]
T: PaddingBane,