Enum tango_client::types::CommandData [−][src]
pub enum CommandData {
Show 26 variants
Void,
Boolean(bool),
Short(i16),
UShort(u16),
Long(i32),
ULong(u32),
Long64(i64),
ULong64(u64),
Float(f32),
Double(f64),
String(Vec<u8>),
State(TangoDevState),
Encoded(DevEncoded),
BooleanArray(Vec<bool>),
CharArray(Vec<u8>),
ShortArray(Vec<i16>),
UShortArray(Vec<u16>),
LongArray(Vec<i32>),
ULongArray(Vec<u32>),
Long64Array(Vec<i64>),
ULong64Array(Vec<u64>),
FloatArray(Vec<f32>),
DoubleArray(Vec<f64>),
StringArray(Vec<Vec<u8>>),
LongStringArray(Vec<i32>, Vec<Vec<u8>>),
DoubleStringArray(Vec<f64>, Vec<Vec<u8>>),
}
Expand description
Represents the input or output arguments of a command.
The normal way to construct this is to use the desired variant directly.
Variants
Boolean(bool)
Tuple Fields of Boolean
0: bool
Short(i16)
Tuple Fields of Short
0: i16
UShort(u16)
Tuple Fields of UShort
0: u16
Long(i32)
Tuple Fields of Long
0: i32
ULong(u32)
Tuple Fields of ULong
0: u32
Long64(i64)
Tuple Fields of Long64
0: i64
ULong64(u64)
Tuple Fields of ULong64
0: u64
Float(f32)
Tuple Fields of Float
0: f32
Double(f64)
Tuple Fields of Double
0: f64
State(TangoDevState)
Tuple Fields of State
Encoded(DevEncoded)
Tuple Fields of Encoded
0: DevEncoded
Implementations
Try to convert this data into a different type.
If the conversion fails or is impossible, Self
is returned unchanged
in the Err
variant.
Return the value if it’s a bool or integral 0 or 1. Otherwise return
Err(self)
.
Return the value as i32 if it’s an integral type and inside i32 limits.
Otherwise return Err(self)
.
Return the value as i64 if it’s a an integral type and inside i64
limits. Otherwise return Err(self)
.
Return the value as u32 if it’s an integral type and inside u32 limits.
Otherwise return Err(self)
.
Return the value as u64 if it’s an integral type and inside u64 limits.
Otherwise return Err(self)
.
Return the value as f32 if it’s a numeric type. Otherwise return Err(self)
.
Return the value as f64 if it’s a numeric type. Otherwise return Err(self)
.
Return the value as a byte array if it’s a string, DevEncoded or
CharArray. Otherwise return Err(self)
.
Return the value as a string if it’s a string, DevEncoded or CharArray,
and decodable as UTF-8. Otherwise return Err(self)
.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for CommandData
impl Send for CommandData
impl Sync for CommandData
impl Unpin for CommandData
impl UnwindSafe for CommandData
Blanket Implementations
Mutably borrows from an owned value. Read more