pub enum NanonisValue {
}Variants§
U16(u16)
I16(i16)
U32(u32)
I32(i32)
F32(f32)
F64(f64)
String(String)
ArrayU16(Vec<u16>)
ArrayI16(Vec<i16>)
ArrayU32(Vec<u32>)
ArrayI32(Vec<i32>)
ArrayF32(Vec<f32>)
ArrayF64(Vec<f64>)
ArrayString(Vec<String>)
Array2DF32(Vec<Vec<f32>>)
Implementations§
Source§impl NanonisValue
impl NanonisValue
Sourcepub fn as_f32(&self) -> Result<f32, NanonisError>
pub fn as_f32(&self) -> Result<f32, NanonisError>
Extract f32 value with type checking
Sourcepub fn as_f64(&self) -> Result<f64, NanonisError>
pub fn as_f64(&self) -> Result<f64, NanonisError>
Extract f64 value with type checking
Sourcepub fn as_u16(&self) -> Result<u16, NanonisError>
pub fn as_u16(&self) -> Result<u16, NanonisError>
Extract u16 value with type checking
Sourcepub fn as_u32(&self) -> Result<u32, NanonisError>
pub fn as_u32(&self) -> Result<u32, NanonisError>
Extract u32 value with type checking
Sourcepub fn as_i16(&self) -> Result<i16, NanonisError>
pub fn as_i16(&self) -> Result<i16, NanonisError>
Extract i16 value with type checking
Sourcepub fn as_i32(&self) -> Result<i32, NanonisError>
pub fn as_i32(&self) -> Result<i32, NanonisError>
Extract i32 value with type checking
Sourcepub fn as_string_array(&self) -> Result<&[String], NanonisError>
pub fn as_string_array(&self) -> Result<&[String], NanonisError>
Extract string array with type checking
Sourcepub fn as_f32_array(&self) -> Result<&[f32], NanonisError>
pub fn as_f32_array(&self) -> Result<&[f32], NanonisError>
Extract f32 array with type checking
Sourcepub fn as_f64_array(&self) -> Result<&[f64], NanonisError>
pub fn as_f64_array(&self) -> Result<&[f64], NanonisError>
Extract f64 array with type checking
Sourcepub fn as_i32_array(&self) -> Result<&[i32], NanonisError>
pub fn as_i32_array(&self) -> Result<&[i32], NanonisError>
Extract i32 array with type checking
Sourcepub fn as_string(&self) -> Result<&str, NanonisError>
pub fn as_string(&self) -> Result<&str, NanonisError>
Extract string value with type checking
Sourcepub fn as_f32_2d_array(&self) -> Result<&Vec<Vec<f32>>, NanonisError>
pub fn as_f32_2d_array(&self) -> Result<&Vec<Vec<f32>>, NanonisError>
Extract 2D f32 array with type checking
Trait Implementations§
Source§impl Clone for NanonisValue
impl Clone for NanonisValue
Source§fn clone(&self) -> NanonisValue
fn clone(&self) -> NanonisValue
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 moreSource§impl Debug for NanonisValue
impl Debug for NanonisValue
Source§impl From<String> for NanonisValue
impl From<String> for NanonisValue
Source§impl From<f32> for NanonisValue
impl From<f32> for NanonisValue
Source§impl From<f64> for NanonisValue
impl From<f64> for NanonisValue
Source§impl From<i16> for NanonisValue
impl From<i16> for NanonisValue
Source§impl From<i32> for NanonisValue
impl From<i32> for NanonisValue
Source§impl From<u16> for NanonisValue
impl From<u16> for NanonisValue
Source§impl From<u32> for NanonisValue
impl From<u32> for NanonisValue
Source§impl TryFrom<NanonisValue> for Vec<String>
impl TryFrom<NanonisValue> for Vec<String>
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for Vec<f32>
impl TryFrom<NanonisValue> for Vec<f32>
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for Vec<i32>
impl TryFrom<NanonisValue> for Vec<i32>
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for f32
impl TryFrom<NanonisValue> for f32
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for f64
impl TryFrom<NanonisValue> for f64
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for i16
impl TryFrom<NanonisValue> for i16
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for i32
impl TryFrom<NanonisValue> for i32
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for u16
impl TryFrom<NanonisValue> for u16
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Source§impl TryFrom<NanonisValue> for u32
impl TryFrom<NanonisValue> for u32
Source§type Error = NanonisError
type Error = NanonisError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for NanonisValue
impl RefUnwindSafe for NanonisValue
impl Send for NanonisValue
impl Sync for NanonisValue
impl Unpin for NanonisValue
impl UnwindSafe for NanonisValue
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