Struct MessageExt

Source
pub struct MessageExt {
Show 15 fields pub message: Message, pub broker_name: CheetahString, pub queue_id: i32, pub store_size: i32, pub queue_offset: i64, pub sys_flag: i32, pub born_timestamp: i64, pub born_host: SocketAddr, pub store_timestamp: i64, pub store_host: SocketAddr, pub msg_id: CheetahString, pub commit_log_offset: i64, pub body_crc: u32, pub reconsume_times: i32, pub prepared_transaction_offset: i64,
}

Fields§

§message: Message§broker_name: CheetahString§queue_id: i32§store_size: i32§queue_offset: i64§sys_flag: i32§born_timestamp: i64§born_host: SocketAddr§store_timestamp: i64§store_host: SocketAddr§msg_id: CheetahString§commit_log_offset: i64§body_crc: u32§reconsume_times: i32§prepared_transaction_offset: i64

Implementations§

Source§

impl MessageExt

Source

pub fn socket_address_2_byte_buffer(ip: &SocketAddr) -> Bytes

Source

pub fn born_host_bytes(&self) -> Bytes

Source

pub fn born_store_bytes(&self) -> Bytes

Source

pub fn topic(&self) -> &CheetahString

Source

pub fn born_host(&self) -> SocketAddr

Source

pub fn store_host(&self) -> SocketAddr

Source

pub fn with_born_host_v6_flag(&mut self)

Source

pub fn with_store_host_v6_flag(&mut self)

Source

pub fn body(&self) -> Option<Bytes>

Source

pub fn sys_flag(&self) -> i32

Source

pub fn body_crc(&self) -> u32

Source

pub fn queue_id(&self) -> i32

Source

pub fn flag(&self) -> i32

Source

pub fn message_inner(&self) -> &Message

Source

pub fn broker_name(&self) -> &str

Source

pub fn store_size(&self) -> i32

Source

pub fn queue_offset(&self) -> i64

Source

pub fn born_timestamp(&self) -> i64

Source

pub fn store_timestamp(&self) -> i64

Source

pub fn msg_id(&self) -> &CheetahString

Source

pub fn commit_log_offset(&self) -> i64

Source

pub fn reconsume_times(&self) -> i32

Source

pub fn prepared_transaction_offset(&self) -> i64

Source

pub fn set_message_inner(&mut self, message_inner: Message)

Source

pub fn set_broker_name(&mut self, broker_name: CheetahString)

Source

pub fn set_queue_id(&mut self, queue_id: i32)

Source

pub fn set_store_size(&mut self, store_size: i32)

Source

pub fn set_queue_offset(&mut self, queue_offset: i64)

Source

pub fn set_sys_flag(&mut self, sys_flag: i32)

Source

pub fn set_born_timestamp(&mut self, born_timestamp: i64)

Source

pub fn set_born_host(&mut self, born_host: SocketAddr)

Source

pub fn set_store_timestamp(&mut self, store_timestamp: i64)

Source

pub fn set_store_host(&mut self, store_host: SocketAddr)

Source

pub fn set_msg_id(&mut self, msg_id: CheetahString)

Source

pub fn set_commit_log_offset(&mut self, commit_log_offset: i64)

Source

pub fn set_body_crc(&mut self, body_crc: u32)

Source

pub fn set_reconsume_times(&mut self, reconsume_times: i32)

Source

pub fn set_prepared_transaction_offset( &mut self, prepared_transaction_offset: i64, )

Source

pub fn properties(&self) -> &HashMap<CheetahString, CheetahString>

Source

pub fn get_tags(&self) -> Option<CheetahString>

Trait Implementations§

Source§

impl Clone for MessageExt

Source§

fn clone(&self) -> MessageExt

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MessageExt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MessageExt

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for MessageExt

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl MessageTrait for MessageExt

Source§

fn put_property(&mut self, key: CheetahString, value: CheetahString)

Adds a property to the message. Read more
Source§

fn clear_property(&mut self, name: &str)

Clears a specific property from the message. Read more
Source§

fn get_property(&self, name: &CheetahString) -> Option<CheetahString>

Retrieves a property from the message. Read more
Source§

fn get_topic(&self) -> &CheetahString

Retrieves the topic of the message. Read more
Source§

fn set_topic(&mut self, topic: CheetahString)

Sets the topic for the message. Read more
Source§

fn get_flag(&self) -> i32

Retrieves the flag associated with the message. Read more
Source§

fn set_flag(&mut self, flag: i32)

Sets the flag for the message. Read more
Source§

fn get_body(&self) -> Option<&Bytes>

Retrieves the body of the message. Read more
Source§

fn set_body(&mut self, body: Bytes)

Sets the body of the message. Read more
Source§

fn get_properties(&self) -> &HashMap<CheetahString, CheetahString>

Retrieves all properties associated with the message. Read more
Source§

fn set_properties(&mut self, properties: HashMap<CheetahString, CheetahString>)

Sets multiple properties for the message. Read more
Source§

fn get_transaction_id(&self) -> Option<&CheetahString>

Retrieves the transaction ID associated with the message. Read more
Source§

fn set_transaction_id(&mut self, transaction_id: CheetahString)

Sets the transaction ID for the message. Read more
Source§

fn get_compressed_body_mut(&mut self) -> &mut Option<Bytes>

Source§

fn get_compressed_body(&self) -> Option<&Bytes>

Source§

fn set_compressed_body_mut(&mut self, compressed_body: Bytes)

Source§

fn as_any(&self) -> &dyn Any

Converts the message into a dynamic Any type. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Converts the message into a mutable dynamic Any type. Read more
Source§

fn set_keys(&mut self, keys: CheetahString)

Sets the keys for the message. Read more
Source§

fn put_user_property(&mut self, name: CheetahString, value: CheetahString)

Adds a user-defined property to the message. Read more
Source§

fn get_user_property(&self, name: &CheetahString) -> Option<CheetahString>

Retrieves a user-defined property from the message. Read more
Source§

fn get_tags(&self) -> Option<CheetahString>

Retrieves the tags associated with the message. Read more
Source§

fn set_tags(&mut self, tags: CheetahString)

Sets the tags for the message. Read more
Source§

fn get_keys(&self) -> Option<CheetahString>

Retrieves the keys associated with the message. Read more
Source§

fn set_keys_from_collection(&mut self, key_collection: Vec<String>)

Sets multiple keys from a collection for the message. Read more
Source§

fn get_delay_time_level(&self) -> i32

Retrieves the delay time level of the message. Read more
Source§

fn set_delay_time_level(&mut self, level: i32)

Sets the delay time level for the message. Read more
Source§

fn is_wait_store_msg_ok(&self) -> bool

Checks if the message should wait for store acknowledgment. Read more
Source§

fn set_wait_store_msg_ok(&mut self, wait_store_msg_ok: bool)

Sets whether the message should wait for store acknowledgment. Read more
Source§

fn set_instance_id(&mut self, instance_id: CheetahString)

Sets the instance ID for the message. Read more
Source§

fn get_buyer_id(&self) -> Option<CheetahString>

Retrieves the buyer ID associated with the message. Read more
Source§

fn set_buyer_id(&mut self, buyer_id: CheetahString)

Sets the buyer ID for the message. Read more
Source§

fn set_delay_time_sec(&mut self, sec: u64)

Sets the delay time for the message in seconds. Read more
Source§

fn get_delay_time_sec(&self) -> u64

Retrieves the delay time for the message in seconds. Read more
Source§

fn set_delay_time_ms(&mut self, time_ms: u64)

Sets the delay time for the message in milliseconds. Read more
Source§

fn get_delay_time_ms(&self) -> u64

Retrieves the delay time for the message in milliseconds. Read more
Source§

fn set_deliver_time_ms(&mut self, time_ms: u64)

Sets the delivery time for the message in milliseconds. Read more
Source§

fn get_deliver_time_ms(&self) -> u64

Retrieves the delivery time for the message in milliseconds. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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