[][src]Struct amqp_codec::OutMessage

pub struct OutMessage {
    pub message_format: Option<MessageFormat>,
    // some fields omitted
}

Fields

message_format: Option<MessageFormat>

Methods

impl OutMessage[src]

pub fn with_body(body: Bytes) -> OutMessage[src]

Create new message and set body

pub fn with_messages(messages: Vec<TransferBody>) -> OutMessage[src]

Create new message and set messages as body

pub fn header(&self) -> Option<&Header>[src]

Header

pub fn set_header(&mut self, header: Header) -> &mut Self[src]

Set message header

pub fn properties(&self) -> Option<&Properties>[src]

Message properties

pub fn properties_mut(&mut self) -> &mut Properties[src]

Mutable reference to properties

pub fn set_properties<F>(&mut self, f: F) -> &mut Self where
    F: Fn(&mut Properties), 
[src]

Add property

pub fn app_properties(&self) -> Option<&VecStringMap>[src]

Get application property

pub fn set_app_property<K, V>(&mut self, key: K, value: V) -> &mut Self where
    K: Into<Str>,
    V: Into<Variant>, 
[src]

Add application property

pub fn add_message_annotation<K, V>(&mut self, key: K, value: V) -> &mut Self where
    K: Into<Symbol>,
    V: Into<Variant>, 
[src]

Add message annotation

pub fn update<F>(self, f: F) -> Self where
    F: Fn(Self) -> Self, 
[src]

Call closure with message reference

pub fn if_some<T, F>(self, value: &Option<T>, f: F) -> Self where
    F: Fn(Self, &T) -> Self, 
[src]

Call closure if value is Some value

pub fn body(&self) -> &MessageBody[src]

Message body

pub fn value(&self) -> Option<&Variant>[src]

Message value

pub fn set_value<V: Into<Variant>>(&mut self, v: V) -> &mut Self[src]

Set message body value

pub fn set_body<F>(&mut self, f: F) -> &mut Self where
    F: Fn(&mut MessageBody), 
[src]

Set message body

pub fn reply_message(&self) -> OutMessage[src]

Create new message and set correlation_id property

Trait Implementations

impl Encode for OutMessage[src]

impl Decode for OutMessage[src]

impl From<InMessage> for OutMessage[src]

impl From<OutMessage> for TransferBody[src]

impl Clone for OutMessage[src]

impl Default for OutMessage[src]

impl PartialEq<OutMessage> for OutMessage[src]

impl Debug for OutMessage[src]

impl StructuralPartialEq for OutMessage[src]

Auto Trait Implementations

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, 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>,