pub struct Message(pub Box<MessageInner>);Tuple Fields§
§0: Box<MessageInner>Implementations§
Source§impl Message
impl Message
Sourcepub fn with_messages(messages: Vec<TransferBody>) -> Message
pub fn with_messages(messages: Vec<TransferBody>) -> Message
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 set_format(&mut self, format: MessageFormat) -> &mut Self
pub fn set_format(&mut self, format: MessageFormat) -> &mut Self
Set message format
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: FnOnce(&mut Properties),
pub fn set_properties<F>(&mut self, f: F) -> &mut Selfwhere
F: FnOnce(&mut Properties),
Add property
Sourcepub fn app_properties(&self) -> Option<&VecStringMap>
pub fn app_properties(&self) -> Option<&VecStringMap>
Get application property
Sourcepub fn app_properties_mut(&mut self) -> Option<&mut VecStringMap>
pub fn app_properties_mut(&mut self) -> Option<&mut VecStringMap>
Mut ref tp application property
Sourcepub fn app_property(&self, key: &str) -> Option<&Variant>
pub fn app_property(&self, key: &str) -> Option<&Variant>
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 message_annotation(&self, key: &str) -> Option<&Variant>
pub fn message_annotation(&self, key: &str) -> Option<&Variant>
Get message annotation
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 message_annotations(&self) -> Option<&VecSymbolMap>
pub fn message_annotations(&self) -> Option<&VecSymbolMap>
Get message annotations
Sourcepub fn message_annotations_mut(&mut self) -> Option<&mut VecSymbolMap>
pub fn message_annotations_mut(&mut self) -> Option<&mut VecSymbolMap>
Mut reference to message annotations
Sourcepub fn delivery_annotations(&self) -> Option<&VecSymbolMap>
pub fn delivery_annotations(&self) -> Option<&VecSymbolMap>
Delivery annotations
Sourcepub fn delivery_annotations_mut(&mut self) -> Option<&mut VecSymbolMap>
pub fn delivery_annotations_mut(&mut self) -> Option<&mut VecSymbolMap>
Mut reference to delivery annotations
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 body_mut(&mut self) -> &mut MessageBody
pub fn body_mut(&mut self) -> &mut MessageBody
Mutable message body
Sourcepub fn set_body<F>(&mut self, f: F) -> &mut Selfwhere
F: FnOnce(&mut MessageBody),
pub fn set_body<F>(&mut self, f: F) -> &mut Selfwhere
F: FnOnce(&mut MessageBody),
Set message body
Sourcepub fn reply_message(&self) -> Message
pub fn reply_message(&self) -> Message
Create new message and set correlation_id property
Trait Implementations§
Source§impl From<Message> for TransferBody
impl From<Message> for TransferBody
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl !RefUnwindSafe for Message
impl Send for Message
impl !Sync for Message
impl Unpin for Message
impl !UnwindSafe for Message
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