pub enum Scalar {
}
Expand description
De-/serialization target for a NumPy scalar
Variants§
Bool(bool)
U8(u8)
I8(i8)
U16(u16)
I16(i16)
F16(f16)
U32(u32)
I32(i32)
F32(f32)
U64(u64)
I64(i64)
F64(f64)
Unsupported
Implementations§
Source§impl Scalar
impl Scalar
pub fn to_bool(&self) -> Option<bool>
pub fn to_u8(&self) -> Option<u8>
pub fn to_i8(&self) -> Option<i8>
pub fn to_u16(&self) -> Option<u16>
pub fn to_i16(&self) -> Option<i16>
pub fn to_f16(&self) -> Option<f16>
pub fn to_u32(&self) -> Option<u32>
pub fn to_i32(&self) -> Option<i32>
pub fn to_f32(&self) -> Option<f32>
pub fn to_u64(&self) -> Option<u64>
pub fn to_i64(&self) -> Option<i64>
pub fn to_f64(&self) -> Option<f64>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scalar
impl<'de> Deserialize<'de> for Scalar
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
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl Freeze for Scalar
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
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