[][src]Enum amqp_codec::types::Variant

pub enum Variant {
    Null,
    Boolean(bool),
    Ubyte(u8),
    Ushort(u16),
    Uint(u32),
    Ulong(u64),
    Byte(i8),
    Short(i16),
    Int(i32),
    Long(i64),
    Float(OrderedFloat<f32>),
    Double(OrderedFloat<f64>),
    Char(char),
    Timestamp(DateTime<Utc>),
    Uuid(Uuid),
    Binary(Bytes),
    String(Str),
    Symbol(Symbol),
    StaticSymbol(StaticSymbol),
    List(List),
    Map(VariantMap),
    Described((Descriptor, Box<Variant>)),
}

Represents an AMQP type for use in polymorphic collections

Variants

Null

Indicates an empty value.

Boolean(bool)

Represents a true or false value.

Ubyte(u8)

Integer in the range 0 to 2^8 - 1 inclusive.

Ushort(u16)

Integer in the range 0 to 2^16 - 1 inclusive.

Uint(u32)

Integer in the range 0 to 2^32 - 1 inclusive.

Ulong(u64)

Integer in the range 0 to 2^64 - 1 inclusive.

Byte(i8)

Integer in the range 0 to 2^7 - 1 inclusive.

Short(i16)

Integer in the range 0 to 2^15 - 1 inclusive.

Int(i32)

Integer in the range 0 to 2^32 - 1 inclusive.

Long(i64)

Integer in the range 0 to 2^64 - 1 inclusive.

32-bit floating point number (IEEE 754-2008 binary32).

Double(OrderedFloat<f64>)

64-bit floating point number (IEEE 754-2008 binary64).

Char(char)

A single Unicode character.

Timestamp(DateTime<Utc>)

An absolute point in time. Represents an approximate point in time using the Unix time encoding of UTC with a precision of milliseconds. For example, 1311704463521 represents the moment 2011-07-26T18:21:03.521Z.

Uuid(Uuid)

A universally unique identifier as defined by RFC-4122 section 4.1.2

Binary(Bytes)

A sequence of octets.

String(Str)

A sequence of Unicode characters

Symbol(Symbol)

Symbolic values from a constrained domain.

StaticSymbol(StaticSymbol)

Same as Symbol but for static refs

List(List)

List

Map

Described((Descriptor, Box<Variant>))

Described value

Methods

impl Variant[src]

pub fn as_str(&self) -> Option<&str>[src]

pub fn as_int(&self) -> Option<i32>[src]

pub fn as_long(&self) -> Option<i64>[src]

pub fn to_bytes_str(&self) -> Option<ByteString>[src]

Trait Implementations

impl Encode for Variant[src]

fn encode(&self, buf: &mut BytesMut)[src]

Encodes Variant into provided BytesMut

impl From<OrderedFloat<f32>> for Variant[src]

impl From<OrderedFloat<f64>> for Variant[src]

impl From<()> for Variant[src]

impl From<List> for Variant[src]

impl From<Bytes> for Variant[src]

impl From<i64> for Variant[src]

impl From<i8> for Variant[src]

impl From<u64> for Variant[src]

impl From<u8> for Variant[src]

impl From<u32> for Variant[src]

impl From<bool> for Variant[src]

impl From<i16> for Variant[src]

impl From<char> for Variant[src]

impl From<Uuid> for Variant[src]

impl From<i32> for Variant[src]

impl From<DateTime<Utc>> for Variant[src]

impl From<Str> for Variant[src]

impl From<Symbol> for Variant[src]

impl From<StaticSymbol> for Variant[src]

impl From<VariantMap> for Variant[src]

impl From<u16> for Variant[src]

impl From<(Descriptor, Box<Variant>)> for Variant[src]

impl From<ByteString> for Variant[src]

impl From<String> for Variant[src]

impl From<&'static str> for Variant[src]

impl Clone for Variant[src]

impl Eq for Variant[src]

impl PartialEq<Variant> for Variant[src]

impl PartialEq<str> for Variant[src]

impl Debug for Variant[src]

impl Display for Variant[src]

impl Hash for Variant[src]

impl StructuralPartialEq for Variant[src]

impl StructuralEq for Variant[src]

Auto Trait Implementations

impl Send for Variant

impl Sync for Variant

impl Unpin for Variant

impl UnwindSafe for Variant

impl RefUnwindSafe for Variant

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,