pub struct OutMessage {
pub message_format: Option<MessageFormat>,
/* private fields */
}
Fields§
§message_format: Option<MessageFormat>
Implementations§
Source§impl OutMessage
impl OutMessage
Sourcepub fn with_body(body: Bytes) -> OutMessage
pub fn with_body(body: Bytes) -> OutMessage
Create new message and set body
Sourcepub fn with_messages(messages: Vec<TransferBody>) -> OutMessage
pub fn with_messages(messages: Vec<TransferBody>) -> OutMessage
Create new message and set messages as body
Sourcepub fn set_header(&mut self, header: Header) -> &mut Self
pub fn set_header(&mut self, header: Header) -> &mut Self
Set message header
Sourcepub fn properties(&self) -> Option<&Properties>
pub fn properties(&self) -> Option<&Properties>
Message properties
Sourcepub fn properties_mut(&mut self) -> &mut Properties
pub fn properties_mut(&mut self) -> &mut Properties
Mutable reference to properties
Sourcepub fn set_properties<F>(&mut self, f: F) -> &mut Selfwhere
F: Fn(&mut Properties),
pub fn set_properties<F>(&mut self, f: F) -> &mut Selfwhere
F: Fn(&mut Properties),
Add property
Sourcepub fn app_properties(&self) -> Option<&VecStringMap>
pub fn app_properties(&self) -> Option<&VecStringMap>
Get application property
Sourcepub fn set_app_property<K, V>(&mut self, key: K, value: V) -> &mut Self
pub fn set_app_property<K, V>(&mut self, key: K, value: V) -> &mut Self
Add application property
Sourcepub fn add_message_annotation<K, V>(&mut self, key: K, value: V) -> &mut Self
pub fn add_message_annotation<K, V>(&mut self, key: K, value: V) -> &mut Self
Add message annotation
Sourcepub fn update<F>(self, f: F) -> Selfwhere
F: Fn(Self) -> Self,
pub fn update<F>(self, f: F) -> Selfwhere
F: Fn(Self) -> Self,
Call closure with message reference
Sourcepub fn if_some<T, F>(self, value: &Option<T>, f: F) -> Self
pub fn if_some<T, F>(self, value: &Option<T>, f: F) -> Self
Call closure if value is Some value
Sourcepub fn body(&self) -> &MessageBody
pub fn body(&self) -> &MessageBody
Message body
Sourcepub fn set_body<F>(&mut self, f: F) -> &mut Selfwhere
F: Fn(&mut MessageBody),
pub fn set_body<F>(&mut self, f: F) -> &mut Selfwhere
F: Fn(&mut MessageBody),
Set message body
Sourcepub fn reply_message(&self) -> OutMessage
pub fn reply_message(&self) -> OutMessage
Create new message and set correlation_id
property
Trait Implementations§
Source§impl Clone for OutMessage
impl Clone for OutMessage
Source§fn clone(&self) -> OutMessage
fn clone(&self) -> OutMessage
Returns a copy of the value. Read more
1.0.0 · 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 OutMessage
impl Debug for OutMessage
Source§impl Decode for OutMessage
impl Decode for OutMessage
fn decode(input: &[u8]) -> Result<(&[u8], OutMessage), AmqpParseError>
Source§impl Default for OutMessage
impl Default for OutMessage
Source§fn default() -> OutMessage
fn default() -> OutMessage
Returns the “default value” for a type. Read more
Source§impl Encode for OutMessage
impl Encode for OutMessage
Source§impl From<InMessage> for OutMessage
impl From<InMessage> for OutMessage
Source§impl From<OutMessage> for TransferBody
impl From<OutMessage> for TransferBody
Source§fn from(original: OutMessage) -> TransferBody
fn from(original: OutMessage) -> TransferBody
Converts to this type from the input type.
Source§impl PartialEq for OutMessage
impl PartialEq for OutMessage
impl StructuralPartialEq for OutMessage
Auto Trait Implementations§
impl !Freeze for OutMessage
impl !RefUnwindSafe for OutMessage
impl Send for OutMessage
impl !Sync for OutMessage
impl Unpin for OutMessage
impl UnwindSafe for OutMessage
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