pub struct DefaultLitePullConsumer { /* private fields */ }Expand description
Default implementation of a lite pull consumer.
This is the main entry point for creating and using a lite pull consumer. It acts as a facade
over the internal implementation (DefaultLitePullConsumerImpl) and provides:
- Configuration management via
DefaultLitePullConsumerBuilder - Namespace handling (automatic topic name wrapping/unwrapping)
- Optional message trace integration
- A clean public API that delegates to the internal implementation
§Architecture
┌────────────────────────────────────┐
│ DefaultLitePullConsumer │ ← Public Facade
│ (config, trace, namespace) │
└──────────────┬─────────────────────┘
│ delegates
↓
┌────────────────────────────────────┐
│ DefaultLitePullConsumerImpl │ ← Core Logic
│ (lifecycle, pull, commit, etc.) │
└────────────────────────────────────┘§Examples
§Basic usage with auto-commit
use rocketmq_client::DefaultLitePullConsumer;
let consumer = DefaultLitePullConsumer::builder(client_runtime.clone())
.consumer_group("my_consumer_group")
.name_server_addr("127.0.0.1:9876")
.auto_commit(true)
.build()?;
consumer.start().await?;
consumer.subscribe("my_topic").await?;
loop {
let messages = consumer.poll_with_timeout(1000).await;
for msg in messages {
println!("Received: {:?}", msg);
}
// Offsets are auto-committed
}§Manual offset control
let consumer = DefaultLitePullConsumer::builder(client_runtime.clone())
.consumer_group("my_consumer_group")
.name_server_addr("127.0.0.1:9876")
.auto_commit(false) // Disable auto-commit
.build()?;
consumer.start().await?;
consumer.subscribe("my_topic").await?;
loop {
let messages = consumer.poll_with_timeout(1000).await;
for msg in messages {
// Process message
}
// Manually commit after processing
consumer.commit_all().await?;
}§Manual queue assignment (no rebalance)
use rocketmq_model::common::message::message_queue::MessageQueue;
let mq1 = MessageQueue::from_parts("my_topic", "broker-a", 0);
let mq2 = MessageQueue::from_parts("my_topic", "broker-a", 1);
consumer.start().await?;
consumer.assign(vec![mq1, mq2]).await?;
let messages = consumer.poll().await;Implementations§
Source§impl DefaultLitePullConsumer
impl DefaultLitePullConsumer
Sourcepub fn new(
client_runtime: Arc<ClientRuntime>,
client_config: ClientConfig,
consumer_config: LitePullConsumerConfig,
rpc_hook: Option<Arc<dyn RPCHook>>,
trace_dispatcher: Option<Arc<dyn TraceDispatcher + Send + Sync>>,
enable_msg_trace: bool,
custom_trace_topic: Option<CheetahString>,
) -> Self
pub fn new( client_runtime: Arc<ClientRuntime>, client_config: ClientConfig, consumer_config: LitePullConsumerConfig, rpc_hook: Option<Arc<dyn RPCHook>>, trace_dispatcher: Option<Arc<dyn TraceDispatcher + Send + Sync>>, enable_msg_trace: bool, custom_trace_topic: Option<CheetahString>, ) -> Self
Creates a new consumer with the specified configuration.
Most users should use builder() instead.
Sourcepub fn builder(
client_runtime: Arc<ClientRuntime>,
) -> DefaultLitePullConsumerBuilder
pub fn builder( client_runtime: Arc<ClientRuntime>, ) -> DefaultLitePullConsumerBuilder
Sourcepub async fn start(&self) -> ClientResult<()>
pub async fn start(&self) -> ClientResult<()>
Starts the consumer.
Sourcepub async fn is_running(&self) -> bool
pub async fn is_running(&self) -> bool
Returns whether the consumer is currently running.
Sourcepub async fn consumer_running_info(&self) -> ClientResult<ConsumerRunningInfo>
pub async fn consumer_running_info(&self) -> ClientResult<ConsumerRunningInfo>
Returns a Java-compatible running snapshot for broker admin diagnostics.
Sourcepub async fn subscribe(&self, topic: &str) -> ClientResult<()>
pub async fn subscribe(&self, topic: &str) -> ClientResult<()>
Subscribes to a topic using the default subscription expression.
Sourcepub async fn subscribe_with_expression(
&self,
topic: &str,
sub_expression: &str,
) -> ClientResult<()>
pub async fn subscribe_with_expression( &self, topic: &str, sub_expression: &str, ) -> ClientResult<()>
Subscribes to a topic using a tag or SQL expression.
Sourcepub async fn subscribe_with_listener<MQL>(
&self,
topic: &str,
sub_expression: &str,
listener: MQL,
) -> ClientResult<()>where
MQL: MessageQueueListener + 'static,
pub async fn subscribe_with_listener<MQL>(
&self,
topic: &str,
sub_expression: &str,
listener: MQL,
) -> ClientResult<()>where
MQL: MessageQueueListener + 'static,
Subscribes with a queue-change listener.
Sourcepub async fn subscribe_with_selector(
&self,
topic: &str,
selector: Option<MessageSelector>,
) -> ClientResult<()>
pub async fn subscribe_with_selector( &self, topic: &str, selector: Option<MessageSelector>, ) -> ClientResult<()>
Subscribes using a server-side selector.
Sourcepub async fn unsubscribe(&self, topic: &str)
pub async fn unsubscribe(&self, topic: &str)
Removes the subscription for a topic.
Sourcepub async fn assignment(&self) -> ClientResult<HashSet<MessageQueue>>
pub async fn assignment(&self) -> ClientResult<HashSet<MessageQueue>>
Returns the currently assigned queues.
Sourcepub async fn assign(
&self,
message_queues: Vec<MessageQueue>,
) -> ClientResult<()>
pub async fn assign( &self, message_queues: Vec<MessageQueue>, ) -> ClientResult<()>
Assigns queues manually, bypassing broker rebalance.
Sourcepub async fn set_sub_expression_for_assign(
&self,
topic: &str,
sub_expression: &str,
) -> ClientResult<()>
pub async fn set_sub_expression_for_assign( &self, topic: &str, sub_expression: &str, ) -> ClientResult<()>
Sets the subscription expression used for manually assigned queues.
Sourcepub async fn build_subscriptions_for_heartbeat(
&self,
sub_expression_map: &mut HashMap<String, MessageSelector>,
) -> ClientResult<()>
pub async fn build_subscriptions_for_heartbeat( &self, sub_expression_map: &mut HashMap<String, MessageSelector>, ) -> ClientResult<()>
Builds subscription metadata for heartbeat payloads.
Sourcepub async fn subscriptions_for_heartbeat(&self) -> HashSet<SubscriptionData>
pub async fn subscriptions_for_heartbeat(&self) -> HashSet<SubscriptionData>
Returns heartbeat subscriptions.
Sourcepub async fn get_subscriptions_for_heartbeat(&self) -> HashSet<SubscriptionData>
pub async fn get_subscriptions_for_heartbeat(&self) -> HashSet<SubscriptionData>
Java-compatible getter alias for heartbeat subscriptions.
Sourcepub async fn poll_zero_copy(&self) -> Vec<Arc<MessageExt>>
pub async fn poll_zero_copy(&self) -> Vec<Arc<MessageExt>>
Polls messages without cloning message payloads.
Sourcepub async fn poll_with_timeout_zero_copy(
&self,
timeout: u64,
) -> Vec<Arc<MessageExt>>
pub async fn poll_with_timeout_zero_copy( &self, timeout: u64, ) -> Vec<Arc<MessageExt>>
Polls messages without cloning message payloads with a custom timeout.
Sourcepub async fn poll(&self) -> Vec<MessageExt>
pub async fn poll(&self) -> Vec<MessageExt>
Polls messages and returns owned copies.
Sourcepub async fn poll_with_timeout(&self, timeout: u64) -> Vec<MessageExt>
pub async fn poll_with_timeout(&self, timeout: u64) -> Vec<MessageExt>
Polls messages with a custom timeout and returns owned copies.
Sourcepub async fn message_model(&self) -> MessageModel
pub async fn message_model(&self) -> MessageModel
Returns the configured message model.
Sourcepub async fn get_message_model(&self) -> MessageModel
pub async fn get_message_model(&self) -> MessageModel
Java-compatible getter alias for the configured message model.
Sourcepub async fn set_message_model(&self, message_model: MessageModel)
pub async fn set_message_model(&self, message_model: MessageModel)
Sets the configured message model.
Sourcepub async fn consume_from_where(&self) -> ConsumeFromWhere
pub async fn consume_from_where(&self) -> ConsumeFromWhere
Returns where consumption starts when no offset exists.
Sourcepub async fn get_consume_from_where(&self) -> ConsumeFromWhere
pub async fn get_consume_from_where(&self) -> ConsumeFromWhere
Java-compatible getter alias for where consumption starts when no offset exists.
Sourcepub async fn set_consume_from_where(
&self,
consume_from_where: ConsumeFromWhere,
) -> ClientResult<()>
pub async fn set_consume_from_where( &self, consume_from_where: ConsumeFromWhere, ) -> ClientResult<()>
Sets where consumption starts when no offset exists.
Sourcepub async fn consume_timestamp(&self) -> Option<CheetahString>
pub async fn consume_timestamp(&self) -> Option<CheetahString>
Returns the consume timestamp.
Sourcepub async fn get_consume_timestamp(&self) -> Option<CheetahString>
pub async fn get_consume_timestamp(&self) -> Option<CheetahString>
Java-compatible getter alias for the consume timestamp.
Sourcepub async fn set_consume_timestamp(
&self,
consume_timestamp: Option<CheetahString>,
)
pub async fn set_consume_timestamp( &self, consume_timestamp: Option<CheetahString>, )
Sets the consume timestamp.
Sourcepub async fn allocate_message_queue_strategy(
&self,
) -> Arc<dyn AllocateMessageQueueStrategy + Send + Sync> ⓘ
pub async fn allocate_message_queue_strategy( &self, ) -> Arc<dyn AllocateMessageQueueStrategy + Send + Sync> ⓘ
Returns the queue allocation strategy.
Sourcepub async fn get_allocate_message_queue_strategy(
&self,
) -> Arc<dyn AllocateMessageQueueStrategy + Send + Sync> ⓘ
pub async fn get_allocate_message_queue_strategy( &self, ) -> Arc<dyn AllocateMessageQueueStrategy + Send + Sync> ⓘ
Java-compatible getter alias for the queue allocation strategy.
Sourcepub async fn set_allocate_message_queue_strategy(
&self,
allocate_message_queue_strategy: Arc<dyn AllocateMessageQueueStrategy + Send + Sync>,
)
pub async fn set_allocate_message_queue_strategy( &self, allocate_message_queue_strategy: Arc<dyn AllocateMessageQueueStrategy + Send + Sync>, )
Sets the queue allocation strategy.
Sourcepub async fn message_queue_listener(&self) -> Option<ArcMessageQueueListener>
pub async fn message_queue_listener(&self) -> Option<ArcMessageQueueListener>
Returns the message queue listener.
Sourcepub async fn get_message_queue_listener(
&self,
) -> Option<ArcMessageQueueListener>
pub async fn get_message_queue_listener( &self, ) -> Option<ArcMessageQueueListener>
Java-compatible getter alias for the message queue listener.
Sourcepub async fn set_message_queue_listener(
&self,
message_queue_listener: Option<ArcMessageQueueListener>,
)
pub async fn set_message_queue_listener( &self, message_queue_listener: Option<ArcMessageQueueListener>, )
Sets the message queue listener.
Sourcepub async fn offset_store(&self) -> Option<Arc<OffsetStore>>
pub async fn offset_store(&self) -> Option<Arc<OffsetStore>>
Returns the configured offset store.
Sourcepub async fn get_offset_store(&self) -> Option<Arc<OffsetStore>>
pub async fn get_offset_store(&self) -> Option<Arc<OffsetStore>>
Java-compatible getter alias for the configured offset store.
Sourcepub async fn set_offset_store(
&self,
offset_store: Option<Arc<OffsetStore>>,
) -> ClientResult<()>
pub async fn set_offset_store( &self, offset_store: Option<Arc<OffsetStore>>, ) -> ClientResult<()>
Sets the configured offset store.
Sourcepub async fn topic_metadata_check_interval_millis(&self) -> u64
pub async fn topic_metadata_check_interval_millis(&self) -> u64
Returns the topic metadata check interval in milliseconds.
Sourcepub async fn get_topic_metadata_check_interval_millis(&self) -> u64
pub async fn get_topic_metadata_check_interval_millis(&self) -> u64
Java-compatible getter alias for the topic metadata check interval.
Sourcepub async fn set_topic_metadata_check_interval_millis(
&self,
interval_millis: u64,
)
pub async fn set_topic_metadata_check_interval_millis( &self, interval_millis: u64, )
Sets the topic metadata check interval in milliseconds.
Sourcepub async fn poll_timeout_millis(&self) -> u64
pub async fn poll_timeout_millis(&self) -> u64
Returns the default poll timeout in milliseconds.
Sourcepub async fn get_poll_timeout_millis(&self) -> u64
pub async fn get_poll_timeout_millis(&self) -> u64
Java-compatible getter alias for the default poll timeout.
Sourcepub async fn set_poll_timeout_millis(&self, timeout_millis: u64)
pub async fn set_poll_timeout_millis(&self, timeout_millis: u64)
Sets the default poll timeout in milliseconds.
Sourcepub async fn broker_suspend_max_time_millis(&self) -> u64
pub async fn broker_suspend_max_time_millis(&self) -> u64
Returns the broker suspend max time in milliseconds.
Sourcepub async fn get_broker_suspend_max_time_millis(&self) -> u64
pub async fn get_broker_suspend_max_time_millis(&self) -> u64
Java-compatible getter alias for the broker suspend max time.
Sourcepub async fn set_broker_suspend_max_time_millis(&self, timeout_millis: u64)
pub async fn set_broker_suspend_max_time_millis(&self, timeout_millis: u64)
Sets the broker suspend max time in milliseconds.
Sourcepub async fn consumer_timeout_millis_when_suspend(&self) -> u64
pub async fn consumer_timeout_millis_when_suspend(&self) -> u64
Returns the consumer timeout while suspended.
Sourcepub async fn get_consumer_timeout_millis_when_suspend(&self) -> u64
pub async fn get_consumer_timeout_millis_when_suspend(&self) -> u64
Java-compatible getter alias for the consumer timeout while suspended.
Sourcepub async fn set_consumer_timeout_millis_when_suspend(
&self,
timeout_millis: u64,
)
pub async fn set_consumer_timeout_millis_when_suspend( &self, timeout_millis: u64, )
Sets the consumer timeout while suspended.
Sourcepub async fn consumer_pull_timeout_millis(&self) -> u64
pub async fn consumer_pull_timeout_millis(&self) -> u64
Returns the pull RPC timeout in milliseconds.
Sourcepub async fn get_consumer_pull_timeout_millis(&self) -> u64
pub async fn get_consumer_pull_timeout_millis(&self) -> u64
Java-compatible getter alias for the pull RPC timeout.
Sourcepub async fn set_consumer_pull_timeout_millis(&self, timeout_millis: u64)
pub async fn set_consumer_pull_timeout_millis(&self, timeout_millis: u64)
Sets the pull RPC timeout in milliseconds.
Sourcepub async fn pull_batch_size(&self) -> i32
pub async fn pull_batch_size(&self) -> i32
Returns the pull batch size.
Sourcepub async fn get_pull_batch_size(&self) -> i32
pub async fn get_pull_batch_size(&self) -> i32
Java-compatible getter alias for the pull batch size.
Sourcepub async fn set_pull_batch_size(&self, pull_batch_size: i32)
pub async fn set_pull_batch_size(&self, pull_batch_size: i32)
Sets the pull batch size.
Sourcepub async fn pull_thread_nums(&self) -> usize
pub async fn pull_thread_nums(&self) -> usize
Returns the configured pull thread count.
Sourcepub async fn get_pull_thread_nums(&self) -> usize
pub async fn get_pull_thread_nums(&self) -> usize
Java-compatible getter alias for the configured pull thread count.
Sourcepub async fn set_pull_thread_nums(&self, pull_thread_nums: usize)
pub async fn set_pull_thread_nums(&self, pull_thread_nums: usize)
Sets the configured pull thread count.
Sourcepub async fn try_set_pull_thread_nums(
&self,
pull_thread_nums: usize,
) -> ClientResult<()>
pub async fn try_set_pull_thread_nums( &self, pull_thread_nums: usize, ) -> ClientResult<()>
Sets the maximum number of concurrent broker pull RPCs before startup.
§Errors
Returns an error when pull_thread_nums is zero or the consumer has
already started.
Sourcepub async fn pull_threshold_for_all(&self) -> i64
pub async fn pull_threshold_for_all(&self) -> i64
Returns the all-queue pull threshold.
Sourcepub async fn get_pull_threshold_for_all(&self) -> i64
pub async fn get_pull_threshold_for_all(&self) -> i64
Java-compatible getter alias for the all-queue pull threshold.
Sourcepub async fn set_pull_threshold_for_all(&self, pull_threshold_for_all: i64)
pub async fn set_pull_threshold_for_all(&self, pull_threshold_for_all: i64)
Sets the all-queue pull threshold.
Sourcepub async fn pull_threshold_for_queue(&self) -> i64
pub async fn pull_threshold_for_queue(&self) -> i64
Returns the per-queue pull threshold.
Sourcepub async fn get_pull_threshold_for_queue(&self) -> i64
pub async fn get_pull_threshold_for_queue(&self) -> i64
Java-compatible getter alias for the per-queue pull threshold.
Sourcepub async fn set_pull_threshold_for_queue(&self, pull_threshold_for_queue: i64)
pub async fn set_pull_threshold_for_queue(&self, pull_threshold_for_queue: i64)
Sets the per-queue pull threshold.
Sourcepub async fn pull_threshold_size_for_queue(&self) -> i32
pub async fn pull_threshold_size_for_queue(&self) -> i32
Returns the per-queue pull size threshold.
Sourcepub async fn get_pull_threshold_size_for_queue(&self) -> i32
pub async fn get_pull_threshold_size_for_queue(&self) -> i32
Java-compatible getter alias for the per-queue pull size threshold.
Sourcepub async fn set_pull_threshold_size_for_queue(
&self,
pull_threshold_size_for_queue: i32,
)
pub async fn set_pull_threshold_size_for_queue( &self, pull_threshold_size_for_queue: i32, )
Sets the per-queue pull size threshold.
Sourcepub async fn consume_max_span(&self) -> i64
pub async fn consume_max_span(&self) -> i64
Returns the max consume span.
Sourcepub async fn get_consume_max_span(&self) -> i64
pub async fn get_consume_max_span(&self) -> i64
Java-compatible getter alias for the max consume span.
Sourcepub async fn set_consume_max_span(&self, consume_max_span: i64)
pub async fn set_consume_max_span(&self, consume_max_span: i64)
Sets the max consume span.
Sourcepub async fn is_connect_broker_by_user(&self) -> bool
pub async fn is_connect_broker_by_user(&self) -> bool
Returns whether pulls use the configured broker id.
Sourcepub async fn set_connect_broker_by_user(&self, connect_broker_by_user: bool)
pub async fn set_connect_broker_by_user(&self, connect_broker_by_user: bool)
Sets whether pulls use the configured broker id.
Sourcepub async fn default_broker_id(&self) -> u64
pub async fn default_broker_id(&self) -> u64
Returns the configured default broker id.
Sourcepub async fn get_default_broker_id(&self) -> u64
pub async fn get_default_broker_id(&self) -> u64
Java-compatible getter alias for the configured default broker id.
Sourcepub async fn set_default_broker_id(&self, broker_id: u64)
pub async fn set_default_broker_id(&self, broker_id: u64)
Sets the configured default broker id.
Sourcepub async fn fetch_message_queues(
&self,
topic: &str,
) -> ClientResult<Vec<MessageQueue>>
pub async fn fetch_message_queues( &self, topic: &str, ) -> ClientResult<Vec<MessageQueue>>
Fetches message queues for a topic.
Sourcepub async fn committed(&self, message_queue: &MessageQueue) -> ClientResult<i64>
pub async fn committed(&self, message_queue: &MessageQueue) -> ClientResult<i64>
Returns the committed offset for a queue.
Sourcepub async fn commit_all(&self) -> ClientResult<()>
pub async fn commit_all(&self) -> ClientResult<()>
Commits all offsets to the configured offset store.
Sourcepub async fn commit_with_map(
&self,
offset_map: HashMap<MessageQueue, i64>,
persist: bool,
)
pub async fn commit_with_map( &self, offset_map: HashMap<MessageQueue, i64>, persist: bool, )
Commits explicit offsets.
Sourcepub async fn commit_with_set(
&self,
message_queues: HashSet<MessageQueue>,
persist: bool,
)
pub async fn commit_with_set( &self, message_queues: HashSet<MessageQueue>, persist: bool, )
Commits offsets for selected queues.
Sourcepub async fn commit_sync(&self)
pub async fn commit_sync(&self)
Java-compatible alias for committing all offsets.
Sourcepub async fn commit_sync_with_map(
&self,
offset_map: HashMap<MessageQueue, i64>,
persist: bool,
)
pub async fn commit_sync_with_map( &self, offset_map: HashMap<MessageQueue, i64>, persist: bool, )
Java-compatible alias for committing explicit offsets.
Sourcepub async fn is_auto_commit(&self) -> bool
pub async fn is_auto_commit(&self) -> bool
Returns whether auto commit is enabled.
Sourcepub async fn set_auto_commit(&self, auto_commit: bool)
pub async fn set_auto_commit(&self, auto_commit: bool)
Sets whether auto commit is enabled.
Sourcepub async fn is_unit_mode(&self) -> bool
pub async fn is_unit_mode(&self) -> bool
Returns whether unit mode is enabled.
Sourcepub async fn set_unit_mode(&self, unit_mode: bool)
pub async fn set_unit_mode(&self, unit_mode: bool)
Sets whether unit mode is enabled.
Sourcepub async fn auto_commit_interval_millis(&self) -> u64
pub async fn auto_commit_interval_millis(&self) -> u64
Returns the auto commit interval in milliseconds.
Sourcepub async fn get_auto_commit_interval_millis(&self) -> u64
pub async fn get_auto_commit_interval_millis(&self) -> u64
Java-compatible getter alias for the auto commit interval.
Sourcepub async fn set_auto_commit_interval_millis(&self, interval_millis: u64)
pub async fn set_auto_commit_interval_millis(&self, interval_millis: u64)
Sets the auto commit interval in milliseconds.
Sourcepub async fn offset_for_timestamp(
&self,
message_queue: &MessageQueue,
timestamp: u64,
) -> ClientResult<i64>
pub async fn offset_for_timestamp( &self, message_queue: &MessageQueue, timestamp: u64, ) -> ClientResult<i64>
Queries the offset for a timestamp.
Sourcepub async fn earliest_msg_store_time(
&self,
message_queue: &MessageQueue,
) -> ClientResult<i64>
pub async fn earliest_msg_store_time( &self, message_queue: &MessageQueue, ) -> ClientResult<i64>
Queries the earliest store time for a queue.
Sourcepub async fn max_offset(
&self,
message_queue: &MessageQueue,
) -> ClientResult<i64>
pub async fn max_offset( &self, message_queue: &MessageQueue, ) -> ClientResult<i64>
Queries the broker max offset for a queue.
Sourcepub async fn min_offset(
&self,
message_queue: &MessageQueue,
) -> ClientResult<i64>
pub async fn min_offset( &self, message_queue: &MessageQueue, ) -> ClientResult<i64>
Queries the broker min offset for a queue.
Sourcepub async fn create_topic(
&self,
key: &str,
new_topic: &str,
queue_num: i32,
attributes: HashMap<String, String>,
) -> ClientResult<()>
pub async fn create_topic( &self, key: &str, new_topic: &str, queue_num: i32, attributes: HashMap<String, String>, ) -> ClientResult<()>
Creates a topic through the Java-compatible MQAdmin facade.
Sourcepub async fn create_topic_with_flag(
&self,
key: &str,
new_topic: &str,
queue_num: i32,
topic_sys_flag: i32,
attributes: HashMap<String, String>,
) -> ClientResult<()>
pub async fn create_topic_with_flag( &self, key: &str, new_topic: &str, queue_num: i32, topic_sys_flag: i32, attributes: HashMap<String, String>, ) -> ClientResult<()>
Creates a topic with an explicit topic system flag.
Sourcepub async fn query_message(
&self,
topic: &str,
key: &str,
max_num: i32,
begin: u64,
end: u64,
) -> ClientResult<QueryResult>
pub async fn query_message( &self, topic: &str, key: &str, max_num: i32, begin: u64, end: u64, ) -> ClientResult<QueryResult>
Queries messages by key in a time range.
Sourcepub async fn view_message(
&self,
topic: &str,
msg_id: &str,
) -> ClientResult<MessageExt>
pub async fn view_message( &self, topic: &str, msg_id: &str, ) -> ClientResult<MessageExt>
Views a message by offset message id or Java-compatible unique message id.
Sourcepub async fn pause(&self, message_queues: Vec<MessageQueue>)
pub async fn pause(&self, message_queues: Vec<MessageQueue>)
Pauses fetching from selected queues.
Sourcepub async fn resume(&self, message_queues: Vec<MessageQueue>)
pub async fn resume(&self, message_queues: Vec<MessageQueue>)
Resumes fetching from selected queues.
Sourcepub async fn is_paused(&self, message_queue: &MessageQueue) -> bool
pub async fn is_paused(&self, message_queue: &MessageQueue) -> bool
Returns whether a queue is paused.
Sourcepub async fn seek(
&self,
message_queue: &MessageQueue,
offset: i64,
) -> ClientResult<()>
pub async fn seek( &self, message_queue: &MessageQueue, offset: i64, ) -> ClientResult<()>
Seeks a queue to an offset.
Sourcepub async fn seek_to_begin(
&self,
message_queue: &MessageQueue,
) -> ClientResult<()>
pub async fn seek_to_begin( &self, message_queue: &MessageQueue, ) -> ClientResult<()>
Seeks a queue to the beginning.
Sourcepub async fn seek_to_end(
&self,
message_queue: &MessageQueue,
) -> ClientResult<()>
pub async fn seek_to_end( &self, message_queue: &MessageQueue, ) -> ClientResult<()>
Seeks a queue to the end.
Sourcepub async fn update_name_server_address(&self, name_server_address: &str)
pub async fn update_name_server_address(&self, name_server_address: &str)
Updates the name server address.
Sourcepub async fn register_topic_message_queue_change_listener<TL>(
&self,
topic: &str,
listener: TL,
) -> ClientResult<()>where
TL: TopicMessageQueueChangeListener + 'static,
pub async fn register_topic_message_queue_change_listener<TL>(
&self,
topic: &str,
listener: TL,
) -> ClientResult<()>where
TL: TopicMessageQueueChangeListener + 'static,
Registers a topic queue-change listener.
Sourcepub fn consumer_group(&self) -> CheetahString
pub fn consumer_group(&self) -> CheetahString
Returns the consumer group name from the current immutable configuration snapshot.
Sourcepub fn get_consumer_group(&self) -> CheetahString
pub fn get_consumer_group(&self) -> CheetahString
Java-compatible getter alias for the consumer group name.
Sourcepub fn set_consumer_group(
&self,
consumer_group: impl Into<CheetahString>,
) -> ClientResult<()>
pub fn set_consumer_group( &self, consumer_group: impl Into<CheetahString>, ) -> ClientResult<()>
Sets the consumer group name before the consumer starts.
Like Java DefaultLitePullConsumer.setConsumerGroup, this updates the facade
configuration. If the internal implementation has already been initialized,
the value is synchronized into the impl and rebalance configuration while it
is still in the create state.
Sourcepub fn namespace(&self) -> Option<CheetahString>
pub fn namespace(&self) -> Option<CheetahString>
Returns the namespace (if configured).
Sourcepub fn customized_trace_topic(&self) -> Option<CheetahString>
pub fn customized_trace_topic(&self) -> Option<CheetahString>
Returns the custom trace topic, if configured.
Sourcepub fn get_customized_trace_topic(&self) -> Option<CheetahString>
pub fn get_customized_trace_topic(&self) -> Option<CheetahString>
Java-compatible getter alias for the custom trace topic.
Sourcepub fn set_customized_trace_topic(
&mut self,
customized_trace_topic: impl Into<CheetahString>,
)
pub fn set_customized_trace_topic( &mut self, customized_trace_topic: impl Into<CheetahString>, )
Sets the custom trace topic used when message tracing is enabled.
Sourcepub fn clear_customized_trace_topic(&mut self)
pub fn clear_customized_trace_topic(&mut self)
Clears the custom trace topic so the default system trace topic is used.
Sourcepub fn is_enable_msg_trace(&self) -> bool
pub fn is_enable_msg_trace(&self) -> bool
Returns whether message trace is enabled.
Sourcepub fn set_enable_msg_trace(&mut self, enable_msg_trace: bool)
pub fn set_enable_msg_trace(&mut self, enable_msg_trace: bool)
Enables or disables message trace for subsequent startup.
Sourcepub fn is_use_tls(&self) -> bool
pub fn is_use_tls(&self) -> bool
Returns whether outbound remoting connections should use TLS.
Sourcepub async fn set_use_tls(&self, use_tls: bool)
pub async fn set_use_tls(&self, use_tls: bool)
Enables or disables TLS on the published client configuration and trace dispatcher.
Sourcepub async fn trace_dispatcher(
&self,
) -> Option<Arc<dyn TraceDispatcher + Send + Sync>>
pub async fn trace_dispatcher( &self, ) -> Option<Arc<dyn TraceDispatcher + Send + Sync>>
Returns the trace dispatcher, if tracing has been configured or initialized.
Sourcepub async fn get_trace_dispatcher(
&self,
) -> Option<Arc<dyn TraceDispatcher + Send + Sync>>
pub async fn get_trace_dispatcher( &self, ) -> Option<Arc<dyn TraceDispatcher + Send + Sync>>
Java-compatible getter alias for the trace dispatcher.
Sourcepub fn client_config(&self) -> Arc<ClientConfig> ⓘ
pub fn client_config(&self) -> Arc<ClientConfig> ⓘ
Returns the current immutable client configuration snapshot.
Sourcepub fn consumer_config(&self) -> Arc<LitePullConsumerConfig> ⓘ
pub fn consumer_config(&self) -> Arc<LitePullConsumerConfig> ⓘ
Returns the current immutable consumer configuration snapshot.
Trait Implementations§
Source§impl AssignmentControl for DefaultLitePullConsumer
impl AssignmentControl for DefaultLitePullConsumer
Source§async fn assignment(&self) -> ClientResult<HashSet<MessageQueue>>
async fn assignment(&self) -> ClientResult<HashSet<MessageQueue>>
MessageQueues currently assigned to this consumer. Read moreSource§async fn assign(&self, message_queues: Vec<MessageQueue>) -> ClientResult<()>
async fn assign(&self, message_queues: Vec<MessageQueue>) -> ClientResult<()>
MessageQueues to this consumer, bypassing broker rebalance. Read moreSource§async fn set_sub_expression_for_assign(
&self,
topic: &str,
sub_expression: &str,
) -> ClientResult<()>
async fn set_sub_expression_for_assign( &self, topic: &str, sub_expression: &str, ) -> ClientResult<()>
Source§async fn pause(&self, message_queues: Vec<MessageQueue>)
async fn pause(&self, message_queues: Vec<MessageQueue>)
MessageQueues. Read moreSource§async fn resume(&self, message_queues: Vec<MessageQueue>)
async fn resume(&self, message_queues: Vec<MessageQueue>)
MessageQueues. Read moreSource§async fn is_paused(&self, message_queue: &MessageQueue) -> bool
async fn is_paused(&self, message_queue: &MessageQueue) -> bool
MessageQueue is currently paused. Read moreSource§async fn seek(
&self,
message_queue: &MessageQueue,
offset: i64,
) -> ClientResult<()>
async fn seek( &self, message_queue: &MessageQueue, offset: i64, ) -> ClientResult<()>
MessageQueue to the given offset. Read moreSource§async fn seek_to_begin(&self, message_queue: &MessageQueue) -> ClientResult<()>
async fn seek_to_begin(&self, message_queue: &MessageQueue) -> ClientResult<()>
MessageQueue to its earliest available offset. Read moreSource§async fn seek_to_end(&self, message_queue: &MessageQueue) -> ClientResult<()>
async fn seek_to_end(&self, message_queue: &MessageQueue) -> ClientResult<()>
MessageQueue to its latest available offset. Read moreSource§impl ClientSessionProvider for DefaultLitePullConsumer
impl ClientSessionProvider for DefaultLitePullConsumer
fn client_session(&self) -> Option<&ClientSession>
Source§impl Clone for DefaultLitePullConsumer
impl Clone for DefaultLitePullConsumer
Source§impl ConsumerLifecycle for DefaultLitePullConsumer
impl ConsumerLifecycle for DefaultLitePullConsumer
Source§async fn start(&self) -> ClientResult<()>
async fn start(&self) -> ClientResult<()>
Source§async fn shutdown(&self)
async fn shutdown(&self)
Source§async fn is_running(&self) -> bool
async fn is_running(&self) -> bool
Source§impl ConsumerOffsetControl for DefaultLitePullConsumer
impl ConsumerOffsetControl for DefaultLitePullConsumer
Source§async fn offset_store(&self) -> Option<Arc<OffsetStore>>
async fn offset_store(&self) -> Option<Arc<OffsetStore>>
Source§async fn set_offset_store(
&self,
offset_store: Option<Arc<OffsetStore>>,
) -> ClientResult<()>
async fn set_offset_store( &self, offset_store: Option<Arc<OffsetStore>>, ) -> ClientResult<()>
Source§async fn fetch_message_queues(
&self,
topic: &str,
) -> ClientResult<Vec<MessageQueue>>
async fn fetch_message_queues( &self, topic: &str, ) -> ClientResult<Vec<MessageQueue>>
MessageQueues belonging to the specified topic. Read moreSource§async fn committed(&self, message_queue: &MessageQueue) -> ClientResult<i64>
async fn committed(&self, message_queue: &MessageQueue) -> ClientResult<i64>
MessageQueue. Read moreSource§async fn commit_all(&self) -> ClientResult<()>
async fn commit_all(&self) -> ClientResult<()>
Source§async fn commit_with_map(
&self,
offset_map: HashMap<MessageQueue, i64>,
persist: bool,
)
async fn commit_with_map( &self, offset_map: HashMap<MessageQueue, i64>, persist: bool, )
Source§async fn commit_with_set(
&self,
message_queues: HashSet<MessageQueue>,
persist: bool,
)
async fn commit_with_set( &self, message_queues: HashSet<MessageQueue>, persist: bool, )
Source§async fn commit_sync(&self)
async fn commit_sync(&self)
Source§async fn commit_sync_with_map(
&self,
offset_map: HashMap<MessageQueue, i64>,
persist: bool,
)
async fn commit_sync_with_map( &self, offset_map: HashMap<MessageQueue, i64>, persist: bool, )
Source§async fn is_auto_commit(&self) -> bool
async fn is_auto_commit(&self) -> bool
Source§async fn set_auto_commit(&self, auto_commit: bool)
async fn set_auto_commit(&self, auto_commit: bool)
Source§async fn auto_commit_interval_millis(&self) -> u64
async fn auto_commit_interval_millis(&self) -> u64
Source§async fn set_auto_commit_interval_millis(&self, interval_millis: u64)
async fn set_auto_commit_interval_millis(&self, interval_millis: u64)
Source§async fn offset_for_timestamp(
&self,
message_queue: &MessageQueue,
timestamp: u64,
) -> ClientResult<i64>
async fn offset_for_timestamp( &self, message_queue: &MessageQueue, timestamp: u64, ) -> ClientResult<i64>
Source§async fn earliest_msg_store_time(
&self,
message_queue: &MessageQueue,
) -> ClientResult<i64>
async fn earliest_msg_store_time( &self, message_queue: &MessageQueue, ) -> ClientResult<i64>
Source§async fn max_offset(&self, message_queue: &MessageQueue) -> ClientResult<i64>
async fn max_offset(&self, message_queue: &MessageQueue) -> ClientResult<i64>
Source§async fn min_offset(&self, message_queue: &MessageQueue) -> ClientResult<i64>
async fn min_offset(&self, message_queue: &MessageQueue) -> ClientResult<i64>
Source§impl MQConsumer for DefaultLitePullConsumer
impl MQConsumer for DefaultLitePullConsumer
Source§async fn create_topic(
&mut self,
key: &str,
new_topic: &str,
queue_num: i32,
attributes: HashMap<String, String>,
) -> ClientResult<()>
async fn create_topic( &mut self, key: &str, new_topic: &str, queue_num: i32, attributes: HashMap<String, String>, ) -> ClientResult<()>
Source§async fn create_topic_with_flag(
&mut self,
key: &str,
new_topic: &str,
queue_num: i32,
topic_sys_flag: i32,
attributes: HashMap<String, String>,
) -> ClientResult<()>
async fn create_topic_with_flag( &mut self, key: &str, new_topic: &str, queue_num: i32, topic_sys_flag: i32, attributes: HashMap<String, String>, ) -> ClientResult<()>
Source§async fn query_message(
&mut self,
topic: &str,
key: &str,
max_num: i32,
begin: u64,
end: u64,
) -> ClientResult<QueryResult>
async fn query_message( &mut self, topic: &str, key: &str, max_num: i32, begin: u64, end: u64, ) -> ClientResult<QueryResult>
Source§async fn view_message(
&mut self,
topic: &str,
msg_id: &str,
) -> ClientResult<MessageExt>
async fn view_message( &mut self, topic: &str, msg_id: &str, ) -> ClientResult<MessageExt>
async fn send_message_back( &mut self, _msg: MessageExt, _delay_level: i32, _broker_name: &str, ) -> ClientResult<()>
async fn fetch_subscribe_message_queues( &mut self, topic: &str, ) -> ClientResult<Vec<MessageQueue>>
Source§async fn search_offset(
&mut self,
mq: &MessageQueue,
timestamp: u64,
) -> ClientResult<i64>
async fn search_offset( &mut self, mq: &MessageQueue, timestamp: u64, ) -> ClientResult<i64>
Source§async fn max_offset(&mut self, mq: &MessageQueue) -> ClientResult<i64>
async fn max_offset(&mut self, mq: &MessageQueue) -> ClientResult<i64>
Source§async fn min_offset(&mut self, mq: &MessageQueue) -> ClientResult<i64>
async fn min_offset(&mut self, mq: &MessageQueue) -> ClientResult<i64>
Source§async fn earliest_msg_store_time(
&mut self,
mq: &MessageQueue,
) -> ClientResult<i64>
async fn earliest_msg_store_time( &mut self, mq: &MessageQueue, ) -> ClientResult<i64>
Source§async fn send_message_back_to_origin_broker(
&mut self,
msg: MessageExt,
delay_level: i32,
) -> ClientResult<()>
async fn send_message_back_to_origin_broker( &mut self, msg: MessageExt, delay_level: i32, ) -> ClientResult<()>
Source§impl MessagePoll for DefaultLitePullConsumer
impl MessagePoll for DefaultLitePullConsumer
Source§async fn poll_zero_copy(&self) -> Vec<Arc<MessageExt>>
async fn poll_zero_copy(&self) -> Vec<Arc<MessageExt>>
Zero-copy implementation.
Source§async fn poll_with_timeout_zero_copy(
&self,
timeout: u64,
) -> Vec<Arc<MessageExt>>
async fn poll_with_timeout_zero_copy( &self, timeout: u64, ) -> Vec<Arc<MessageExt>>
Zero-copy implementation with custom timeout.
Source§async fn poll(&self) -> Vec<MessageExt>
async fn poll(&self) -> Vec<MessageExt>
Delegates to zero-copy implementation and creates owned message copies.
Source§async fn poll_with_timeout(&self, timeout: u64) -> Vec<MessageExt>
async fn poll_with_timeout(&self, timeout: u64) -> Vec<MessageExt>
Delegates to zero-copy implementation with timeout and creates owned message copies.
Source§async fn poll_timeout_millis(&self) -> u64
async fn poll_timeout_millis(&self) -> u64
Source§async fn set_poll_timeout_millis(&self, timeout_millis: u64)
async fn set_poll_timeout_millis(&self, timeout_millis: u64)
Source§async fn broker_suspend_max_time_millis(&self) -> u64
async fn broker_suspend_max_time_millis(&self) -> u64
Source§async fn set_broker_suspend_max_time_millis(&self, timeout_millis: u64)
async fn set_broker_suspend_max_time_millis(&self, timeout_millis: u64)
Source§async fn consumer_timeout_millis_when_suspend(&self) -> u64
async fn consumer_timeout_millis_when_suspend(&self) -> u64
Source§async fn set_consumer_timeout_millis_when_suspend(&self, timeout_millis: u64)
async fn set_consumer_timeout_millis_when_suspend(&self, timeout_millis: u64)
Source§async fn consumer_pull_timeout_millis(&self) -> u64
async fn consumer_pull_timeout_millis(&self) -> u64
Source§async fn set_consumer_pull_timeout_millis(&self, timeout_millis: u64)
async fn set_consumer_pull_timeout_millis(&self, timeout_millis: u64)
Source§async fn pull_batch_size(&self) -> i32
async fn pull_batch_size(&self) -> i32
Source§async fn set_pull_batch_size(&self, pull_batch_size: i32)
async fn set_pull_batch_size(&self, pull_batch_size: i32)
Source§async fn pull_thread_nums(&self) -> usize
async fn pull_thread_nums(&self) -> usize
Source§async fn set_pull_thread_nums(&self, pull_thread_nums: usize)
async fn set_pull_thread_nums(&self, pull_thread_nums: usize)
Source§async fn pull_threshold_for_all(&self) -> i64
async fn pull_threshold_for_all(&self) -> i64
Source§async fn set_pull_threshold_for_all(&self, pull_threshold_for_all: i64)
async fn set_pull_threshold_for_all(&self, pull_threshold_for_all: i64)
Source§async fn pull_threshold_for_queue(&self) -> i64
async fn pull_threshold_for_queue(&self) -> i64
Source§async fn set_pull_threshold_for_queue(&self, pull_threshold_for_queue: i64)
async fn set_pull_threshold_for_queue(&self, pull_threshold_for_queue: i64)
Source§async fn pull_threshold_size_for_queue(&self) -> i32
async fn pull_threshold_size_for_queue(&self) -> i32
Source§async fn set_pull_threshold_size_for_queue(
&self,
pull_threshold_size_for_queue: i32,
)
async fn set_pull_threshold_size_for_queue( &self, pull_threshold_size_for_queue: i32, )
Source§async fn consume_max_span(&self) -> i64
async fn consume_max_span(&self) -> i64
Source§async fn set_consume_max_span(&self, consume_max_span: i64)
async fn set_consume_max_span(&self, consume_max_span: i64)
Source§impl SubscriptionControl for DefaultLitePullConsumer
impl SubscriptionControl for DefaultLitePullConsumer
Source§async fn subscribe(&self, topic: &str) -> ClientResult<()>
async fn subscribe(&self, topic: &str) -> ClientResult<()>
Source§async fn subscribe_with_expression(
&self,
topic: &str,
sub_expression: &str,
) -> ClientResult<()>
async fn subscribe_with_expression( &self, topic: &str, sub_expression: &str, ) -> ClientResult<()>
Source§async fn subscribe_with_listener<MQL>(
&self,
topic: &str,
sub_expression: &str,
listener: MQL,
) -> ClientResult<()>where
MQL: MessageQueueListener + 'static,
async fn subscribe_with_listener<MQL>(
&self,
topic: &str,
sub_expression: &str,
listener: MQL,
) -> ClientResult<()>where
MQL: MessageQueueListener + 'static,
Source§async fn subscribe_with_selector(
&self,
topic: &str,
selector: Option<MessageSelector>,
) -> ClientResult<()>
async fn subscribe_with_selector( &self, topic: &str, selector: Option<MessageSelector>, ) -> ClientResult<()>
MessageSelector for server-side filtering. Read moreSource§async fn unsubscribe(&self, topic: &str)
async fn unsubscribe(&self, topic: &str)
Source§async fn build_subscriptions_for_heartbeat(
&self,
sub_expression_map: &mut HashMap<String, MessageSelector>,
) -> ClientResult<()>
async fn build_subscriptions_for_heartbeat( &self, sub_expression_map: &mut HashMap<String, MessageSelector>, ) -> ClientResult<()>
sub_expression_map with the filter selector for each subscribed topic,
providing the subscription metadata required for heartbeat payloads. Read moreSource§async fn subscriptions_for_heartbeat(&self) -> HashSet<SubscriptionData>
async fn subscriptions_for_heartbeat(&self) -> HashSet<SubscriptionData>
Source§async fn message_model(&self) -> MessageModel
async fn message_model(&self) -> MessageModel
Source§async fn set_message_model(&self, message_model: MessageModel)
async fn set_message_model(&self, message_model: MessageModel)
Source§async fn consume_from_where(&self) -> ConsumeFromWhere
async fn consume_from_where(&self) -> ConsumeFromWhere
Source§async fn set_consume_from_where(
&self,
consume_from_where: ConsumeFromWhere,
) -> ClientResult<()>
async fn set_consume_from_where( &self, consume_from_where: ConsumeFromWhere, ) -> ClientResult<()>
Source§async fn consume_timestamp(&self) -> Option<CheetahString>
async fn consume_timestamp(&self) -> Option<CheetahString>
ConsumeFromWhere::ConsumeFromTimestamp.Source§async fn set_consume_timestamp(&self, consume_timestamp: Option<CheetahString>)
async fn set_consume_timestamp(&self, consume_timestamp: Option<CheetahString>)
ConsumeFromWhere::ConsumeFromTimestamp.Source§async fn allocate_message_queue_strategy(
&self,
) -> Arc<dyn AllocateMessageQueueStrategy + Send + Sync> ⓘ
async fn allocate_message_queue_strategy( &self, ) -> Arc<dyn AllocateMessageQueueStrategy + Send + Sync> ⓘ
Source§async fn set_allocate_message_queue_strategy(
&self,
allocate_message_queue_strategy: Arc<dyn AllocateMessageQueueStrategy + Send + Sync>,
)
async fn set_allocate_message_queue_strategy( &self, allocate_message_queue_strategy: Arc<dyn AllocateMessageQueueStrategy + Send + Sync>, )
Source§async fn message_queue_listener(&self) -> Option<ArcMessageQueueListener>
async fn message_queue_listener(&self) -> Option<ArcMessageQueueListener>
Source§async fn set_message_queue_listener(
&self,
message_queue_listener: Option<ArcMessageQueueListener>,
)
async fn set_message_queue_listener( &self, message_queue_listener: Option<ArcMessageQueueListener>, )
Source§async fn topic_metadata_check_interval_millis(&self) -> u64
async fn topic_metadata_check_interval_millis(&self) -> u64
Source§async fn set_topic_metadata_check_interval_millis(&self, interval_millis: u64)
async fn set_topic_metadata_check_interval_millis(&self, interval_millis: u64)
Source§async fn is_connect_broker_by_user(&self) -> bool
async fn is_connect_broker_by_user(&self) -> bool
Source§async fn set_connect_broker_by_user(&self, connect_broker_by_user: bool)
async fn set_connect_broker_by_user(&self, connect_broker_by_user: bool)
Source§async fn default_broker_id(&self) -> u64
async fn default_broker_id(&self) -> u64
Source§async fn set_default_broker_id(&self, broker_id: u64)
async fn set_default_broker_id(&self, broker_id: u64)
Source§async fn is_unit_mode(&self) -> bool
async fn is_unit_mode(&self) -> bool
Source§async fn set_unit_mode(&self, unit_mode: bool)
async fn set_unit_mode(&self, unit_mode: bool)
Source§async fn update_name_server_address(&self, name_server_address: &str)
async fn update_name_server_address(&self, name_server_address: &str)
Source§async fn register_topic_message_queue_change_listener<TL>(
&self,
topic: &str,
listener: TL,
) -> ClientResult<()>where
TL: TopicMessageQueueChangeListener + 'static,
async fn register_topic_message_queue_change_listener<TL>(
&self,
topic: &str,
listener: TL,
) -> ClientResult<()>where
TL: TopicMessageQueueChangeListener + 'static,
MessageQueues for a topic changes. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DefaultLitePullConsumer
impl !UnwindSafe for DefaultLitePullConsumer
impl Freeze for DefaultLitePullConsumer
impl Send for DefaultLitePullConsumer
impl Sync for DefaultLitePullConsumer
impl Unpin for DefaultLitePullConsumer
impl UnsafeUnpin for DefaultLitePullConsumer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.