pub enum Format {
BinaryLittleEndian,
Ascii,
BinaryBigEndian,
}
Expand description
Polygon format.
Variants§
BinaryLittleEndian
Binary little endian format.
Ascii
ASCII format.
BinaryBigEndian
Binary big endian format.
Implementations§
source§impl Format
impl Format
sourcepub const fn is_binary_little_endian(&self) -> bool
pub const fn is_binary_little_endian(&self) -> bool
Returns true
if this value is of type BinaryLittleEndian
. Returns false
otherwise
sourcepub const fn is_ascii(&self) -> bool
pub const fn is_ascii(&self) -> bool
Returns true
if this value is of type Ascii
. Returns false
otherwise
sourcepub const fn is_binary_big_endian(&self) -> bool
pub const fn is_binary_big_endian(&self) -> bool
Returns true
if this value is of type BinaryBigEndian
. Returns false
otherwise
source§impl Format
impl Format
sourcepub fn try_unwrap_binary_little_endian(self) -> Result<(), TryUnwrapError<Self>>
pub fn try_unwrap_binary_little_endian(self) -> Result<(), TryUnwrapError<Self>>
Attempts to unwrap this value to the Format::BinaryLittleEndian
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_binary_little_endian_ref(
&self,
) -> Result<(), TryUnwrapError<&Self>>
pub fn try_unwrap_binary_little_endian_ref( &self, ) -> Result<(), TryUnwrapError<&Self>>
Attempts to unwrap this reference to the Format::BinaryLittleEndian
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_binary_little_endian_mut(
&mut self,
) -> Result<(), TryUnwrapError<&mut Self>>
pub fn try_unwrap_binary_little_endian_mut( &mut self, ) -> Result<(), TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the Format::BinaryLittleEndian
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_ascii(self) -> Result<(), TryUnwrapError<Self>>
pub fn try_unwrap_ascii(self) -> Result<(), TryUnwrapError<Self>>
Attempts to unwrap this value to the Format::Ascii
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_ascii_ref(&self) -> Result<(), TryUnwrapError<&Self>>
pub fn try_unwrap_ascii_ref(&self) -> Result<(), TryUnwrapError<&Self>>
Attempts to unwrap this reference to the Format::Ascii
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_ascii_mut(&mut self) -> Result<(), TryUnwrapError<&mut Self>>
pub fn try_unwrap_ascii_mut(&mut self) -> Result<(), TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the Format::Ascii
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_binary_big_endian(self) -> Result<(), TryUnwrapError<Self>>
pub fn try_unwrap_binary_big_endian(self) -> Result<(), TryUnwrapError<Self>>
Attempts to unwrap this value to the Format::BinaryBigEndian
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_binary_big_endian_ref(
&self,
) -> Result<(), TryUnwrapError<&Self>>
pub fn try_unwrap_binary_big_endian_ref( &self, ) -> Result<(), TryUnwrapError<&Self>>
Attempts to unwrap this reference to the Format::BinaryBigEndian
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
sourcepub fn try_unwrap_binary_big_endian_mut(
&mut self,
) -> Result<(), TryUnwrapError<&mut Self>>
pub fn try_unwrap_binary_big_endian_mut( &mut self, ) -> Result<(), TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the Format::BinaryBigEndian
variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
source§impl Format
impl Format
sourcepub const fn is_binary_native_endian(&self) -> bool
pub const fn is_binary_native_endian(&self) -> bool
Check if the format is binary little endian.
sourcepub const fn binary_native_endian() -> Self
pub const fn binary_native_endian() -> Self
Return the binary format with native endianness.
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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>
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>
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