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

Void
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
String(Vec<u8>)

Tuple Fields of String

0: Vec<u8>

Tuple Fields of State

0: TangoDevState
Encoded(DevEncoded)

Tuple Fields of Encoded

0: DevEncoded
BooleanArray(Vec<bool>)

Tuple Fields of BooleanArray

0: Vec<bool>
CharArray(Vec<u8>)

Tuple Fields of CharArray

0: Vec<u8>
ShortArray(Vec<i16>)

Tuple Fields of ShortArray

0: Vec<i16>
UShortArray(Vec<u16>)

Tuple Fields of UShortArray

0: Vec<u16>
LongArray(Vec<i32>)

Tuple Fields of LongArray

0: Vec<i32>
ULongArray(Vec<u32>)

Tuple Fields of ULongArray

0: Vec<u32>
Long64Array(Vec<i64>)

Tuple Fields of Long64Array

0: Vec<i64>
ULong64Array(Vec<u64>)

Tuple Fields of ULong64Array

0: Vec<u64>
FloatArray(Vec<f32>)

Tuple Fields of FloatArray

0: Vec<f32>
DoubleArray(Vec<f64>)

Tuple Fields of DoubleArray

0: Vec<f64>
StringArray(Vec<Vec<u8>>)

Tuple Fields of StringArray

0: Vec<Vec<u8>>
LongStringArray(Vec<i32>, Vec<Vec<u8>>)

Tuple Fields of LongStringArray

0: Vec<i32>1: Vec<Vec<u8>>
DoubleStringArray(Vec<f64>, Vec<Vec<u8>>)

Tuple Fields of DoubleStringArray

0: Vec<f64>1: Vec<Vec<u8>>

Implementations

Construct a CommandData from a Rust string slice.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter.

Formats the value using the given formatter.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Formats the value using the given formatter.

Formats the value using the given formatter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.