pub struct InMessage {
pub message_format: Option<MessageFormat>,
/* private fields */
}
Fields§
§message_format: Option<MessageFormat>
Implementations§
Source§impl InMessage
impl InMessage
Sourcepub fn with_messages(messages: Vec<TransferBody>) -> InMessage
pub fn with_messages(messages: Vec<TransferBody>) -> InMessage
Create new message and set messages as body
Sourcepub fn set_header(self, header: Header) -> Self
pub fn set_header(self, header: Header) -> Self
Set message header
Sourcepub fn properties(&self) -> Option<&Properties>
pub fn properties(&self) -> Option<&Properties>
Message properties
Sourcepub fn set_properties<F>(self, f: F) -> Selfwhere
F: Fn(&mut Properties),
pub fn set_properties<F>(self, f: F) -> Selfwhere
F: Fn(&mut Properties),
Add property
Sourcepub fn app_property(&self, key: &str) -> Option<&Variant>
pub fn app_property(&self, key: &str) -> Option<&Variant>
Get application property
Sourcepub fn app_properties(&self) -> Option<&StringVariantMap>
pub fn app_properties(&self) -> Option<&StringVariantMap>
Get application properties
Sourcepub fn message_annotation(&self, key: &str) -> Option<&Variant>
pub fn message_annotation(&self, key: &str) -> Option<&Variant>
Get message annotation
Sourcepub fn set_app_property<K: Into<Str>, V: Into<Variant>>(
self,
key: K,
value: V,
) -> Self
pub fn set_app_property<K: Into<Str>, V: Into<Variant>>( self, key: K, value: V, ) -> Self
Add application property
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>(self, f: F) -> Selfwhere
F: Fn(&mut MessageBody),
pub fn set_body<F>(self, f: F) -> 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 From<InMessage> for OutMessage
impl From<InMessage> for OutMessage
Source§impl From<InMessage> for TransferBody
impl From<InMessage> for TransferBody
Source§fn from(original: InMessage) -> TransferBody
fn from(original: InMessage) -> TransferBody
Converts to this type from the input type.
impl StructuralPartialEq for InMessage
Auto Trait Implementations§
impl !Freeze for InMessage
impl !RefUnwindSafe for InMessage
impl Send for InMessage
impl !Sync for InMessage
impl Unpin for InMessage
impl UnwindSafe for InMessage
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