pub struct MessageAccessor;Implementations§
Source§impl MessageAccessor
impl MessageAccessor
Sourcepub fn set_properties<T: MessageTrait>(
msg: &mut T,
properties: HashMap<CheetahString, CheetahString>,
)
pub fn set_properties<T: MessageTrait>( msg: &mut T, properties: HashMap<CheetahString, CheetahString>, )
Sets the properties of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.properties- AHashMapcontaining the properties to set.
Sourcepub fn put_property<T: MessageTrait>(
msg: &mut T,
name: CheetahString,
value: CheetahString,
)
pub fn put_property<T: MessageTrait>( msg: &mut T, name: CheetahString, value: CheetahString, )
Puts a property into a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.name- The name of the property.value- The value of the property.
Sourcepub fn clear_property<T: MessageTrait>(msg: &mut T, name: &str)
pub fn clear_property<T: MessageTrait>(msg: &mut T, name: &str)
Clears a property from a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.name- The name of the property to clear.
Sourcepub fn set_transfer_flag<T: MessageTrait>(msg: &mut T, unit: CheetahString)
pub fn set_transfer_flag<T: MessageTrait>(msg: &mut T, unit: CheetahString)
Sets the transfer flag of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.unit- The transfer flag value.
Sourcepub fn get_transfer_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>
pub fn get_transfer_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>
Sourcepub fn set_correction_flag<T: MessageTrait>(msg: &mut T, unit: CheetahString)
pub fn set_correction_flag<T: MessageTrait>(msg: &mut T, unit: CheetahString)
Sets the correction flag of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.unit- The correction flag value.
Sourcepub fn get_correction_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>
pub fn get_correction_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>
Sourcepub fn set_origin_message_id<T: MessageTrait>(
msg: &mut T,
origin_message_id: CheetahString,
)
pub fn set_origin_message_id<T: MessageTrait>( msg: &mut T, origin_message_id: CheetahString, )
Sets the origin message ID of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.origin_message_id- The origin message ID value.
Sourcepub fn get_origin_message_id<T: MessageTrait>(msg: &T) -> Option<CheetahString>
pub fn get_origin_message_id<T: MessageTrait>(msg: &T) -> Option<CheetahString>
Sourcepub fn set_mq2_flag<T: MessageTrait>(msg: &mut T, flag: CheetahString)
pub fn set_mq2_flag<T: MessageTrait>(msg: &mut T, flag: CheetahString)
Sets the MQ2 flag of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.flag- The MQ2 flag value.
Sourcepub fn get_mq2_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>
pub fn get_mq2_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>
Sourcepub fn set_reconsume_time<T: MessageTrait>(
msg: &mut T,
reconsume_times: CheetahString,
)
pub fn set_reconsume_time<T: MessageTrait>( msg: &mut T, reconsume_times: CheetahString, )
Sets the reconsume time of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.reconsume_times- The reconsume time value.
Sourcepub fn get_reconsume_time<T: MessageTrait>(msg: &T) -> Option<CheetahString>
pub fn get_reconsume_time<T: MessageTrait>(msg: &T) -> Option<CheetahString>
Sourcepub fn set_max_reconsume_times<T: MessageTrait>(
msg: &mut T,
max_reconsume_times: CheetahString,
)
pub fn set_max_reconsume_times<T: MessageTrait>( msg: &mut T, max_reconsume_times: CheetahString, )
Sets the maximum reconsume times of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.max_reconsume_times- The maximum reconsume times value.
Sourcepub fn get_max_reconsume_times<T: MessageTrait>(
msg: &T,
) -> Option<CheetahString>
pub fn get_max_reconsume_times<T: MessageTrait>( msg: &T, ) -> Option<CheetahString>
Sourcepub fn set_consume_start_time_stamp<T: MessageTrait>(
msg: &mut T,
property_consume_start_time_stamp: CheetahString,
)
pub fn set_consume_start_time_stamp<T: MessageTrait>( msg: &mut T, property_consume_start_time_stamp: CheetahString, )
Sets the consume start timestamp of a message.
§Arguments
msg- A mutable reference to a message implementing theMessageTrait.property_consume_start_time_stamp- The consume start timestamp value.
Sourcepub fn get_consume_start_time_stamp<T: MessageTrait>(
msg: &T,
) -> Option<CheetahString>
pub fn get_consume_start_time_stamp<T: MessageTrait>( msg: &T, ) -> Option<CheetahString>
Sourcepub fn clone_message<M>(message: &M) -> Messagewhere
M: MessageTrait,
pub fn clone_message<M>(message: &M) -> Messagewhere
M: MessageTrait,
Clones a message.
Auto Trait Implementations§
impl Freeze for MessageAccessor
impl RefUnwindSafe for MessageAccessor
impl Send for MessageAccessor
impl Sync for MessageAccessor
impl Unpin for MessageAccessor
impl UnsafeUnpin for MessageAccessor
impl UnwindSafe for MessageAccessor
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