pub enum FieldValue {
}Expand description
AMQP field value type.
User is recommended to use conversion method to create FieldValue from rust’s type.
See RabbitMQ errata.
§Usage
// convert from `bool`
let x: FieldValue = true.into();
// convert into `bool`
let y: bool = x.try_into().unwrap();Variants§
t(bool)
b(i8)
B(u8)
s(i16)
u(u16)
I(i32)
i(u32)
l(i64)
f(f32)
d(f64)
D(DecimalValue)
S(LongStr)
A(FieldArray)
T(u64)
F(FieldTable)
V
x(ByteArray)
Trait Implementations§
Source§impl Clone for FieldValue
impl Clone for FieldValue
Source§fn clone(&self) -> FieldValue
fn clone(&self) -> FieldValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FieldValue
impl Debug for FieldValue
Source§impl<'de> Deserialize<'de> for FieldValue
impl<'de> Deserialize<'de> for FieldValue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FieldValue
impl Display for FieldValue
Source§impl From<&str> for FieldValue
impl From<&str> for FieldValue
Source§fn from(v: &str) -> FieldValue
fn from(v: &str) -> FieldValue
Converts to this type from the input type.
Source§impl From<FieldTable> for FieldValue
impl From<FieldTable> for FieldValue
Source§fn from(v: FieldTable) -> FieldValue
fn from(v: FieldTable) -> FieldValue
Converts to this type from the input type.
Source§impl From<LongStr> for FieldValue
impl From<LongStr> for FieldValue
Source§fn from(v: LongStr) -> FieldValue
fn from(v: LongStr) -> FieldValue
Converts to this type from the input type.
Source§impl From<String> for FieldValue
RabbitMQ’s field value support only long string variant, so rust string type
always converted to long string variant.
impl From<String> for FieldValue
RabbitMQ’s field value support only long string variant, so rust string type always converted to long string variant.
Source§fn from(v: String) -> FieldValue
fn from(v: String) -> FieldValue
Converts to this type from the input type.
Source§impl From<bool> for FieldValue
impl From<bool> for FieldValue
Source§fn from(v: bool) -> FieldValue
fn from(v: bool) -> FieldValue
Converts to this type from the input type.
Source§impl PartialEq for FieldValue
impl PartialEq for FieldValue
Source§fn eq(&self, other: &FieldValue) -> bool
fn eq(&self, other: &FieldValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FieldValue
impl Serialize for FieldValue
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for FieldValue
Source§impl<'a> TryFrom<&'a FieldValue> for &'a LongStr
impl<'a> TryFrom<&'a FieldValue> for &'a LongStr
Source§impl<'a> TryFrom<&'a FieldValue> for &'a str
impl<'a> TryFrom<&'a FieldValue> for &'a str
Source§impl TryFrom<FieldValue> for FieldTable
impl TryFrom<FieldValue> for FieldTable
Source§fn try_from(
value: FieldValue,
) -> Result<FieldTable, <FieldTable as TryFrom<FieldValue>>::Error>
fn try_from( value: FieldValue, ) -> Result<FieldTable, <FieldTable as TryFrom<FieldValue>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for FieldValue
impl RefUnwindSafe for FieldValue
impl Send for FieldValue
impl Sync for FieldValue
impl Unpin for FieldValue
impl UnsafeUnpin for FieldValue
impl UnwindSafe for FieldValue
Blanket Implementations§
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
Mutably borrows from an owned value. Read more