Enum protos::traits::VariableType
source · pub enum VariableType {
Show 25 variants
None,
Any,
Enum {
vendor_id: u32,
type_id: u32,
},
Bool,
Int,
Int2,
Int3,
Int4,
Int8,
Int16,
Float,
Float2,
Float3,
Float4,
Color,
Bytes,
String,
Image,
Seq(Vec<VariableType>),
Table(TableInfo),
Object {
vendor_id: u32,
type_id: u32,
},
Audio,
Code(Box<CodeInfo>),
Mesh,
Channel(Box<VariableType>),
}
Expand description
Enum represents all the possible types that a variable can be
Variants§
None
Any
Enum
VendorID, TypeID
Bool
Int
A 64bits int
Int2
A vector of 2 64bits ints
Int3
A vector of 3 32bits ints
Int4
A vector of 4 32bits ints
Int8
A vector of 8 16bits ints
Int16
A vector of 16 8bits ints
Float
A 64bits float
Float2
A vector of 2 64bits floats
Float3
A vector of 3 32bits floats
Float4
A vector of 4 32bits floats
Color
A vector of 4 uint8
Bytes
String
Image
Seq(Vec<VariableType>)
Table(TableInfo)
Object
VendorID, TypeID
Audio
Code(Box<CodeInfo>)
Mesh
Channel(Box<VariableType>)
Trait Implementations§
source§impl Clone for VariableType
impl Clone for VariableType
source§fn clone(&self) -> VariableType
fn clone(&self) -> VariableType
Returns a copy 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 VariableType
impl Debug for VariableType
source§impl Decode for VariableType
impl Decode for VariableType
source§impl<'de> Deserialize<'de> for VariableType
impl<'de> Deserialize<'de> for VariableType
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
source§impl Encode for VariableType
impl Encode for VariableType
source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
Convert self to a slice and append it to the destination.
source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl PartialEq<VariableType> for VariableType
impl PartialEq<VariableType> for VariableType
source§fn eq(&self, other: &VariableType) -> bool
fn eq(&self, other: &VariableType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.