pub enum AMQPValue {
Show 18 variants Boolean(Boolean), ShortShortInt(ShortShortInt), ShortShortUInt(ShortShortUInt), ShortInt(ShortInt), ShortUInt(ShortUInt), LongInt(LongInt), LongUInt(LongUInt), LongLongInt(LongLongInt), Float(Float), Double(Double), DecimalValue(DecimalValue), ShortString(ShortString), LongString(LongString), FieldArray(FieldArray), Timestamp(Timestamp), FieldTable(FieldTable), ByteArray(ByteArray), Void,
}
Expand description

Enumeration referencing the possible AMQP values depending on the types

Variants

Boolean(Boolean)

A bool

ShortShortInt(ShortShortInt)

An i8

ShortShortUInt(ShortShortUInt)

A u8

ShortInt(ShortInt)

An i16

ShortUInt(ShortUInt)

A u16

LongInt(LongInt)

An i32

LongUInt(LongUInt)

A u32

LongLongInt(LongLongInt)

An i64

Float(Float)

An f32

Double(Double)

An f64

DecimalValue(DecimalValue)

A decimal value

ShortString(ShortString)

A String (deprecated)

LongString(LongString)

A String

FieldArray(FieldArray)

An array of AMQPValue

Timestamp(Timestamp)

A timestamp (u64)

FieldTable(FieldTable)

A Map<String, AMQPValue>

ByteArray(ByteArray)

An array of bytes (RabbitMQ specific)

Void

No value

Implementations

Get the AMQPType of an AMQPValue

Convert a serde_json::Value into an AMQPValue

If the value is bool, returns associated value. Returns None otherwise.

If the value is ShortShortInt, returns associated value. Returns None otherwise.

If the value is ShortShortUInt, returns associated value. Returns None otherwise.

If the value is ShortInt, returns associated value. Returns None otherwise.

If the value is ShortUInt, returns associated value. Returns None otherwise.

If the value is LongInt, returns associated value. Returns None otherwise.

If the value is LongUInt, returns associated value. Returns None otherwise.

If the value is LongLongInt, returns associated value. Returns None otherwise.

If the value is Float, returns associated value. Returns None otherwise.

If the value is Double, returns associated value. Returns None otherwise.

If the value is DecimalValue, returns associated value. Returns None otherwise.

If the value is ShortString, returns associated value as str. Returns None otherwise.

If the value is LongString, returns associated value as bytes. Returns None otherwise.

If the value is FieldArray, returns associated value. Returns None otherwise.

If the value is Timestamp, returns associated value. Returns None otherwise.

If the value is FieldTable, returns associated value. Returns None otherwise.

If the value is ByteArray, returns associated value. Returns None otherwise.

Returns true if value is Void.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.