Struct MessageAccessor

Source
pub struct MessageAccessor;

Implementations§

Source§

impl MessageAccessor

Source

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 the MessageTrait.
  • properties - A HashMap containing the properties to set.
Source

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 the MessageTrait.
  • name - The name of the property.
  • value - The value of the property.
Source

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 the MessageTrait.
  • name - The name of the property to clear.
Source

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 the MessageTrait.
  • unit - The transfer flag value.
Source

pub fn get_transfer_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>

Gets the transfer flag of a message.

§Arguments
  • msg - A reference to a message implementing the MessageTrait.
§Returns
  • Option<String> - The transfer flag value if it exists.
Source

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 the MessageTrait.
  • unit - The correction flag value.
Source

pub fn get_correction_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>

Gets the correction flag of a message.

§Arguments
  • msg - A reference to a message implementing the MessageTrait.
§Returns
  • Option<String> - The correction flag value if it exists.
Source

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 the MessageTrait.
  • origin_message_id - The origin message ID value.
Source

pub fn get_origin_message_id<T: MessageTrait>(msg: &T) -> Option<CheetahString>

Gets the origin message ID of a message.

§Arguments
  • msg - A reference to a message implementing the MessageTrait.
§Returns
  • Option<String> - The origin message ID value if it exists.
Source

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 the MessageTrait.
  • flag - The MQ2 flag value.
Source

pub fn get_mq2_flag<T: MessageTrait>(msg: &T) -> Option<CheetahString>

Gets the MQ2 flag of a message.

§Arguments
  • msg - A reference to a message implementing the MessageTrait.
§Returns
  • Option<String> - The MQ2 flag value if it exists.
Source

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 the MessageTrait.
  • reconsume_times - The reconsume time value.
Source

pub fn get_reconsume_time<T: MessageTrait>(msg: &T) -> Option<CheetahString>

Gets the reconsume time of a message.

§Arguments
  • msg - A reference to a message implementing the MessageTrait.
§Returns
  • Option<String> - The reconsume time value if it exists.
Source

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 the MessageTrait.
  • max_reconsume_times - The maximum reconsume times value.
Source

pub fn get_max_reconsume_times<T: MessageTrait>( msg: &T, ) -> Option<CheetahString>

Gets the maximum reconsume times of a message.

§Arguments
  • msg - A reference to a message implementing the MessageTrait.
§Returns
  • Option<String> - The maximum reconsume times value if it exists.
Source

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 the MessageTrait.
  • property_consume_start_time_stamp - The consume start timestamp value.
Source

pub fn get_consume_start_time_stamp<T: MessageTrait>( msg: &T, ) -> Option<CheetahString>

Gets the consume start timestamp of a message.

§Arguments
  • msg - A reference to a message implementing the MessageTrait.
§Returns
  • Option<String> - The consume start timestamp value if it exists.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T