pub enum AMQPValue {
Show 18 variants
Boolean(bool),
ShortShortInt(i8),
ShortShortUInt(u8),
ShortInt(i16),
ShortUInt(u16),
LongInt(i32),
LongUInt(u32),
LongLongInt(i64),
Float(f32),
Double(f64),
DecimalValue(DecimalValue),
ShortString(ShortString),
LongString(LongString),
FieldArray(FieldArray),
Timestamp(u64),
FieldTable(FieldTable),
ByteArray(ByteArray),
Void,
}Expand description
Enumeration referencing the possible AMQP values depending on the types
Variants§
Boolean(bool)
A bool
ShortShortInt(i8)
An i8
ShortShortUInt(u8)
A u8
ShortInt(i16)
An i16
ShortUInt(u16)
A u16
LongInt(i32)
An i32
LongUInt(u32)
A u32
LongLongInt(i64)
An i64
Float(f32)
An f32
Double(f64)
An f64
DecimalValue(DecimalValue)
A decimal value
ShortString(ShortString)
A String (deprecated)
LongString(LongString)
A String
FieldArray(FieldArray)
An array of AMQPValue
Timestamp(u64)
A timestamp (u64)
FieldTable(FieldTable)
A Map<String, AMQPValue>
ByteArray(ByteArray)
An array of bytes (RabbitMQ specific)
Void
No value
Implementations§
Source§impl AMQPValue
impl AMQPValue
Sourcepub fn as_bool(&self) -> Option<bool>
pub fn as_bool(&self) -> Option<bool>
If the value is bool, returns associated value. Returns None otherwise.
Sourcepub fn as_short_short_int(&self) -> Option<i8>
pub fn as_short_short_int(&self) -> Option<i8>
If the value is ShortShortInt, returns associated value. Returns None otherwise.
Sourcepub fn as_short_short_uint(&self) -> Option<u8>
pub fn as_short_short_uint(&self) -> Option<u8>
If the value is ShortShortUInt, returns associated value. Returns None otherwise.
Sourcepub fn as_short_int(&self) -> Option<i16>
pub fn as_short_int(&self) -> Option<i16>
If the value is ShortInt, returns associated value. Returns None otherwise.
Sourcepub fn as_short_uint(&self) -> Option<u16>
pub fn as_short_uint(&self) -> Option<u16>
If the value is ShortUInt, returns associated value. Returns None otherwise.
Sourcepub fn as_long_int(&self) -> Option<i32>
pub fn as_long_int(&self) -> Option<i32>
If the value is LongInt, returns associated value. Returns None otherwise.
Sourcepub fn as_long_uint(&self) -> Option<u32>
pub fn as_long_uint(&self) -> Option<u32>
If the value is LongUInt, returns associated value. Returns None otherwise.
Sourcepub fn as_long_long_int(&self) -> Option<i64>
pub fn as_long_long_int(&self) -> Option<i64>
If the value is LongLongInt, returns associated value. Returns None otherwise.
Sourcepub fn as_float(&self) -> Option<f32>
pub fn as_float(&self) -> Option<f32>
If the value is Float, returns associated value. Returns None otherwise.
Sourcepub fn as_double(&self) -> Option<f64>
pub fn as_double(&self) -> Option<f64>
If the value is Double, returns associated value. Returns None otherwise.
Sourcepub fn as_decimal_value(&self) -> Option<DecimalValue>
pub fn as_decimal_value(&self) -> Option<DecimalValue>
If the value is DecimalValue, returns associated value. Returns None otherwise.
Sourcepub fn as_timestamp(&self) -> Option<u64>
pub fn as_timestamp(&self) -> Option<u64>
If the value is Timestamp, returns associated value. Returns None otherwise.
Sourcepub fn as_short_string(&self) -> Option<&ShortString>
pub fn as_short_string(&self) -> Option<&ShortString>
If the value is ShortString, returns associated value. Returns None otherwise.
Sourcepub fn as_long_string(&self) -> Option<&LongString>
pub fn as_long_string(&self) -> Option<&LongString>
If the value is LongString, returns associated value. Returns None otherwise.
Sourcepub fn as_array(&self) -> Option<&FieldArray>
pub fn as_array(&self) -> Option<&FieldArray>
If the value is FieldArray, returns associated value. Returns None otherwise.
Sourcepub fn as_field_table(&self) -> Option<&FieldTable>
pub fn as_field_table(&self) -> Option<&FieldTable>
If the value is FieldTable, returns associated value. Returns None otherwise.
Sourcepub fn as_byte_array(&self) -> Option<&ByteArray>
pub fn as_byte_array(&self) -> Option<&ByteArray>
If the value is ByteArray, returns associated value. Returns None otherwise.