Enum zarrs::array::FillValueMetadata
source · pub enum FillValueMetadata {
Bool(bool),
UInt(u64),
Int(i64),
Float(FillValueFloat),
ByteArray(Vec<u8>),
Complex(FillValueFloat, FillValueFloat),
}
Expand description
Fill value metadata.
Variants§
Bool(bool)
A boolean value.
UInt(u64)
An unsigned integer.
Int(i64)
A signed integer.
Float(FillValueFloat)
A float.
ByteArray(Vec<u8>)
A raw data type.
Complex(FillValueFloat, FillValueFloat)
A complex number.
Implementations§
source§impl FillValueMetadata
impl FillValueMetadata
sourcepub const fn try_as_bool(&self) -> Option<bool>
pub const fn try_as_bool(&self) -> Option<bool>
Convert the fill value to a bool
.
sourcepub fn try_as_int<T: TryFrom<i64> + TryFrom<u64>>(&self) -> Option<T>
pub fn try_as_int<T: TryFrom<i64> + TryFrom<u64>>(&self) -> Option<T>
Convert the fill value to an signed integer.
sourcepub fn try_as_uint<T: TryFrom<i64> + TryFrom<u64>>(&self) -> Option<T>
pub fn try_as_uint<T: TryFrom<i64> + TryFrom<u64>>(&self) -> Option<T>
Convert the fill value to an unsigned integer.
sourcepub fn try_as_float<T: FloatCore>(&self) -> Option<T>
pub fn try_as_float<T: FloatCore>(&self) -> Option<T>
Convert the fill value to a float.
sourcepub fn try_as_float_pair<T: FloatCore>(&self) -> Option<(T, T)>
pub fn try_as_float_pair<T: FloatCore>(&self) -> Option<(T, T)>
Convert the fill value to a complex number (float pair).
sourcepub fn try_as_float16(&self) -> Option<f16>
pub fn try_as_float16(&self) -> Option<f16>
Convert the fill value to a f16
.
sourcepub fn try_as_bfloat16(&self) -> Option<bf16>
pub fn try_as_bfloat16(&self) -> Option<bf16>
Convert the fill value to a bf16
.
Trait Implementations§
source§impl Clone for FillValueMetadata
impl Clone for FillValueMetadata
source§fn clone(&self) -> FillValueMetadata
fn clone(&self) -> FillValueMetadata
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 FillValueMetadata
impl Debug for FillValueMetadata
source§impl<'de> Deserialize<'de> for FillValueMetadata
impl<'de> Deserialize<'de> for FillValueMetadata
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for FillValueMetadata
impl Display for FillValueMetadata
source§impl PartialEq for FillValueMetadata
impl PartialEq for FillValueMetadata
source§fn eq(&self, other: &FillValueMetadata) -> bool
fn eq(&self, other: &FillValueMetadata) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for FillValueMetadata
impl Serialize for FillValueMetadata
source§impl TryFrom<&str> for FillValueMetadata
impl TryFrom<&str> for FillValueMetadata
impl StructuralPartialEq for FillValueMetadata
Auto Trait Implementations§
impl Freeze for FillValueMetadata
impl RefUnwindSafe for FillValueMetadata
impl Send for FillValueMetadata
impl Sync for FillValueMetadata
impl Unpin for FillValueMetadata
impl UnwindSafe for FillValueMetadata
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