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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AMQPValue
impl<'de> Deserialize<'de> for AMQPValue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AMQPValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AMQPValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<DecimalValue> for AMQPValue
impl From<DecimalValue> for AMQPValue
Source§fn from(v: DecimalValue) -> AMQPValue
fn from(v: DecimalValue) -> AMQPValue
Source§impl From<FieldArray> for AMQPValue
impl From<FieldArray> for AMQPValue
Source§fn from(v: FieldArray) -> AMQPValue
fn from(v: FieldArray) -> AMQPValue
Source§impl From<FieldTable> for AMQPValue
impl From<FieldTable> for AMQPValue
Source§fn from(v: FieldTable) -> AMQPValue
fn from(v: FieldTable) -> AMQPValue
Source§impl From<LongString> for AMQPValue
impl From<LongString> for AMQPValue
Source§fn from(v: LongString) -> AMQPValue
fn from(v: LongString) -> AMQPValue
Source§impl From<ShortString> for AMQPValue
impl From<ShortString> for AMQPValue
Source§fn from(v: ShortString) -> AMQPValue
fn from(v: ShortString) -> AMQPValue
Source§impl Serialize for AMQPValue
impl Serialize for AMQPValue
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for AMQPValue
Auto Trait Implementations§
impl Freeze for AMQPValue
impl RefUnwindSafe for AMQPValue
impl Send for AMQPValue
impl Sync for AMQPValue
impl Unpin for AMQPValue
impl UnsafeUnpin for AMQPValue
impl UnwindSafe for AMQPValue
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MessageWire for Twhere
T: Serialize,
impl<T> MessageWire for Twhere
T: Serialize,
Source§type Wire = EncodedWire
type Wire = EncodedWire
EncodedWire or SerializedWire.impl<T> PublishedThrough<DefaultSlot> for T
Source§impl<R> ReplyShape for R
impl<R> ReplyShape for R
type Body = R
type Headers = ()
Source§type Wire = EncodedReply
type Wire = EncodedReply
EncodedReply or SerializedReply.