pub struct ExtraInfoUtil;Implementations§
Source§impl ExtraInfoUtil
impl ExtraInfoUtil
Sourcepub fn parse_ack_extra_info(extra_info: &str) -> Result<AckExtraInfo<'_>>
pub fn parse_ack_extra_info(extra_info: &str) -> Result<AckExtraInfo<'_>>
Parses the fixed POP receipt-handle prefix without allocating its fields.
Sourcepub fn split(extra_info: &str) -> Vec<String>
pub fn split(extra_info: &str) -> Vec<String>
Split the extra info string using the key separator
Sourcepub fn get_ck_queue_offset(extra_info_strs: &[String]) -> Result<i64>
pub fn get_ck_queue_offset(extra_info_strs: &[String]) -> Result<i64>
Get the checkpoint queue offset from the extra info
Sourcepub fn get_pop_time(extra_info_strs: &[String]) -> Result<i64>
pub fn get_pop_time(extra_info_strs: &[String]) -> Result<i64>
Get the pop time from the extra info
Sourcepub fn get_invisible_time(extra_info_strs: &[String]) -> Result<i64>
pub fn get_invisible_time(extra_info_strs: &[String]) -> Result<i64>
Get the invisible time from the extra info
Sourcepub fn get_revive_qid(extra_info_strs: &[String]) -> Result<i32>
pub fn get_revive_qid(extra_info_strs: &[String]) -> Result<i32>
Get the revive queue ID from the extra info
Sourcepub fn get_real_topic(
extra_info_strs: &[String],
topic: &str,
cid: &str,
) -> Result<String>
pub fn get_real_topic( extra_info_strs: &[String], topic: &str, cid: &str, ) -> Result<String>
Get the real topic name based on the retry flag
Sourcepub fn get_real_topic_with_retry(
topic: &str,
cid: &str,
retry: &str,
) -> Result<String>
pub fn get_real_topic_with_retry( topic: &str, cid: &str, retry: &str, ) -> Result<String>
Get the real topic name based on the retry flag
Sourcepub fn get_retry(extra_info_strs: &[String]) -> Result<String>
pub fn get_retry(extra_info_strs: &[String]) -> Result<String>
Get the retry flag from the extra info
Sourcepub fn get_broker_name(extra_info_strs: &[String]) -> Result<String>
pub fn get_broker_name(extra_info_strs: &[String]) -> Result<String>
Get the broker name from the extra info
Sourcepub fn get_queue_id(extra_info_strs: &[String]) -> Result<i32>
pub fn get_queue_id(extra_info_strs: &[String]) -> Result<i32>
Get the queue ID from the extra info
Sourcepub fn get_queue_offset(extra_info_strs: &[String]) -> Result<i64>
pub fn get_queue_offset(extra_info_strs: &[String]) -> Result<i64>
Get the queue offset from the extra info
Sourcepub fn build_extra_info(
ck_queue_offset: i64,
pop_time: i64,
invisible_time: i64,
revive_qid: i32,
topic: &str,
broker_name: &str,
queue_id: i32,
) -> String
pub fn build_extra_info( ck_queue_offset: i64, pop_time: i64, invisible_time: i64, revive_qid: i32, topic: &str, broker_name: &str, queue_id: i32, ) -> String
Build extra info string
Sourcepub fn build_extra_info_with_offset(
ck_queue_offset: i64,
pop_time: i64,
invisible_time: i64,
revive_qid: i32,
topic: &str,
broker_name: &str,
queue_id: i32,
msg_queue_offset: i64,
) -> String
pub fn build_extra_info_with_offset( ck_queue_offset: i64, pop_time: i64, invisible_time: i64, revive_qid: i32, topic: &str, broker_name: &str, queue_id: i32, msg_queue_offset: i64, ) -> String
Build extra info string with queue offset
Sourcepub fn build_extra_info_with_offset_and_retry_policy(
ck_queue_offset: i64,
pop_time: i64,
invisible_time: i64,
revive_qid: i32,
topic: &str,
broker_name: &str,
queue_id: i32,
msg_queue_offset: i64,
retry_policy: &PopRetryPolicy,
) -> String
pub fn build_extra_info_with_offset_and_retry_policy( ck_queue_offset: i64, pop_time: i64, invisible_time: i64, revive_qid: i32, topic: &str, broker_name: &str, queue_id: i32, msg_queue_offset: i64, retry_policy: &PopRetryPolicy, ) -> String
Builds a receipt handle that carries the persisted POP retry policy generation.
Existing eight-field handles remain valid. The optional ninth field is emitted only for retry topics, while the existing retry marker continues to identify v1 or v2.
Sourcepub fn build_start_offset_info(
string_builder: &mut String,
topic: &str,
queue_id: i32,
start_offset: i64,
)
pub fn build_start_offset_info( string_builder: &mut String, topic: &str, queue_id: i32, start_offset: i64, )
Build start offset info
Sourcepub fn build_queue_id_order_count_info(
string_builder: &mut String,
topic: &str,
queue_id: i32,
order_count: i32,
)
pub fn build_queue_id_order_count_info( string_builder: &mut String, topic: &str, queue_id: i32, order_count: i32, )
Build queue ID order count info
Sourcepub fn build_queue_offset_order_count_info(
string_builder: &mut String,
topic: &str,
queue_id: i64,
queue_offset: i64,
order_count: i32,
)
pub fn build_queue_offset_order_count_info( string_builder: &mut String, topic: &str, queue_id: i64, queue_offset: i64, order_count: i32, )
Build queue offset order count info
Sourcepub fn build_msg_offset_info(
string_builder: &mut String,
topic: &str,
queue_id: i32,
msg_offsets: &[u64],
)
pub fn build_msg_offset_info( string_builder: &mut String, topic: &str, queue_id: i32, msg_offsets: &[u64], )
Build message offset info
Sourcepub fn parse_msg_offset_info(
msg_offset_info: &str,
) -> Result<HashMap<String, Vec<i64>>>
pub fn parse_msg_offset_info( msg_offset_info: &str, ) -> Result<HashMap<String, Vec<i64>>>
Parse message offset info into a HashMap
Sourcepub fn parse_start_offset_info(
start_offset_info: &str,
) -> Result<HashMap<String, i64>>
pub fn parse_start_offset_info( start_offset_info: &str, ) -> Result<HashMap<String, i64>>
Parse start offset info into a HashMap
Sourcepub fn parse_order_count_info(
order_count_info: &str,
) -> Result<HashMap<String, i32>>
pub fn parse_order_count_info( order_count_info: &str, ) -> Result<HashMap<String, i32>>
Parse order count info into a HashMap
Sourcepub fn get_start_offset_info_map_key(topic: &str, key: i64) -> String
pub fn get_start_offset_info_map_key(topic: &str, key: i64) -> String
Get start offset info map key
Sourcepub fn get_start_offset_info_map_key_with_pop_ck(
topic: &str,
pop_ck: Option<&str>,
key: i64,
) -> Result<String>
pub fn get_start_offset_info_map_key_with_pop_ck( topic: &str, pop_ck: Option<&str>, key: i64, ) -> Result<String>
Get start offset info map key with pop check
Sourcepub fn get_queue_offset_key_value_key(
queue_id: i64,
queue_offset: i64,
) -> String
pub fn get_queue_offset_key_value_key( queue_id: i64, queue_offset: i64, ) -> String
Get queue offset key value key
Auto Trait Implementations§
impl Freeze for ExtraInfoUtil
impl RefUnwindSafe for ExtraInfoUtil
impl Send for ExtraInfoUtil
impl Sync for ExtraInfoUtil
impl Unpin for ExtraInfoUtil
impl UnsafeUnpin for ExtraInfoUtil
impl UnwindSafe for ExtraInfoUtil
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
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.