Trait vector_buffers::encoding::AsMetadata
source · pub trait AsMetadata: Sized {
// Required methods
fn into_u32(self) -> u32;
fn from_u32(value: u32) -> Option<Self>;
}
Expand description
Converts back and forth between user-friendly metadata types and the on-disk integer representation.
Required Methods§
sourcefn from_u32(value: u32) -> Option<Self>
fn from_u32(value: u32) -> Option<Self>
Converts an integer representation of metadata into its real type, if possible.
If the given integer does not represent a valid representation of the given metadata type,
possibly due to including bits not valid for the type, and so on, then None
will be
returned. Otherwise, Some(Self)
will be returned.
Object Safety§
This trait is not object safe.