pub enum NcAttrValue {
Bytes(Vec<i8>),
Chars(String),
Shorts(Vec<i16>),
Ints(Vec<i32>),
Floats(Vec<f32>),
Doubles(Vec<f64>),
UBytes(Vec<u8>),
UShorts(Vec<u16>),
UInts(Vec<u32>),
Int64s(Vec<i64>),
UInt64s(Vec<u64>),
Strings(Vec<String>),
}Expand description
A NetCDF attribute value.
Variants§
Bytes(Vec<i8>)
Chars(String)
Shorts(Vec<i16>)
Ints(Vec<i32>)
Floats(Vec<f32>)
Doubles(Vec<f64>)
UBytes(Vec<u8>)
UShorts(Vec<u16>)
UInts(Vec<u32>)
Int64s(Vec<i64>)
UInt64s(Vec<u64>)
Strings(Vec<String>)
Implementations§
Source§impl NcAttrValue
impl NcAttrValue
Sourcepub fn as_string(&self) -> Option<String>
pub fn as_string(&self) -> Option<String>
Get the value as a string (for Chars or single-element Strings).
Sourcepub fn as_f64(&self) -> Option<f64>
pub fn as_f64(&self) -> Option<f64>
Get the value as f64 (with numeric promotion from the first element).
Sourcepub fn as_f64_vec(&self) -> Option<Vec<f64>>
pub fn as_f64_vec(&self) -> Option<Vec<f64>>
Get the value as a vector of f64 (with numeric promotion).
Trait Implementations§
Source§impl Clone for NcAttrValue
impl Clone for NcAttrValue
Source§fn clone(&self) -> NcAttrValue
fn clone(&self) -> NcAttrValue
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for NcAttrValue
impl RefUnwindSafe for NcAttrValue
impl Send for NcAttrValue
impl Sync for NcAttrValue
impl Unpin for NcAttrValue
impl UnsafeUnpin for NcAttrValue
impl UnwindSafe for NcAttrValue
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