ArrayEncode

Trait ArrayEncode 

Source
pub trait ArrayEncode {
    const ARRAY_CONSTRUCTOR: Constructor;

    // Required methods
    fn array_encoded_size(&self) -> usize;
    fn array_encode(&self, buf: &mut BytesMut);
}
Expand description

Defines routines to encode the type as an element of an AMQP array. It’s different from Encode in that it omits the type constructor (format code or described type definition) when encoding.

Required Associated Constants§

Required Methods§

Source

fn array_encoded_size(&self) -> usize

Returns the size of the type when encoded as an element of an AMQP array.

Source

fn array_encode(&self, buf: &mut BytesMut)

Encodes the type as an element of an AMQP array.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ArrayEncode for bool

Source§

impl ArrayEncode for char

Source§

impl ArrayEncode for f32

Source§

impl ArrayEncode for f64

Source§

impl ArrayEncode for i8

Source§

impl ArrayEncode for i16

Source§

impl ArrayEncode for i32

Source§

impl ArrayEncode for i64

Source§

impl ArrayEncode for str

Source§

impl ArrayEncode for u8

Source§

impl ArrayEncode for u16

Source§

impl ArrayEncode for u32

Source§

impl ArrayEncode for u64

Source§

impl ArrayEncode for DateTime<Utc>

Source§

impl ArrayEncode for Bytes

Source§

impl ArrayEncode for ByteString

Source§

impl ArrayEncode for Uuid

Source§

impl<K: Eq + Hash + Encode, V: Encode> ArrayEncode for HashMap<K, V>

Implementors§