pub enum BlpVersion {
Blp0,
Blp1,
Blp2,
}
Expand description
Version of type format that determines structure of file. Encodes magic bytes that are expected at start of the file.
Variants§
Implementations§
Source§impl BlpVersion
impl BlpVersion
Sourcepub fn to_magic(&self) -> [u8; 4]
pub fn to_magic(&self) -> [u8; 4]
Convert to 4 ASCII symbols that are put into beginning of file to mark that the file has specific version of the format.
Sourcepub fn from_magic(magic: [u8; 4]) -> Option<BlpVersion>
pub fn from_magic(magic: [u8; 4]) -> Option<BlpVersion>
Convert from 4 ASCII symbols from the start of file to known tag of version.
Trait Implementations§
Source§impl Clone for BlpVersion
impl Clone for BlpVersion
Source§fn clone(&self) -> BlpVersion
fn clone(&self) -> BlpVersion
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BlpVersion
impl Debug for BlpVersion
Source§impl Display for BlpVersion
impl Display for BlpVersion
Source§impl FromStr for BlpVersion
impl FromStr for BlpVersion
Source§impl Hash for BlpVersion
impl Hash for BlpVersion
Source§impl Ord for BlpVersion
impl Ord for BlpVersion
Source§fn cmp(&self, other: &BlpVersion) -> Ordering
fn cmp(&self, other: &BlpVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BlpVersion
impl PartialEq for BlpVersion
Source§impl PartialOrd for BlpVersion
impl PartialOrd for BlpVersion
impl Copy for BlpVersion
impl Eq for BlpVersion
impl StructuralPartialEq for BlpVersion
Auto Trait Implementations§
impl Freeze for BlpVersion
impl RefUnwindSafe for BlpVersion
impl Send for BlpVersion
impl Sync for BlpVersion
impl Unpin for BlpVersion
impl UnwindSafe for BlpVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more