Skip to main content

DefaultMQProducer

Struct DefaultMQProducer 

Source
pub struct DefaultMQProducer { /* private fields */ }

Implementations§

Source§

impl DefaultMQProducer

Source

pub fn builder(client_runtime: Arc<ClientRuntime>) -> DefaultMQProducerBuilder

Source

pub fn new(client_runtime: Arc<ClientRuntime>) -> Self

Source

pub fn client_session(&self) -> Option<&ClientSession>

Returns the shared session for a producer created through the public builder. Internal bootstrap producers intentionally have no public session.

Source

pub async fn start(&mut self) -> ClientResult<()>

Source

pub async fn shutdown(&mut self)

Source

pub async fn fetch_publish_message_queues( &mut self, topic: &str, ) -> ClientResult<Vec<MessageQueue>>

Source

pub async fn create_topic( &mut self, key: &str, new_topic: &str, queue_num: i32, attributes: HashMap<String, String>, ) -> ClientResult<()>

Source

pub 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

pub async fn search_offset( &mut self, mq: &MessageQueue, timestamp: u64, ) -> ClientResult<i64>

Source

pub async fn max_offset(&mut self, mq: &MessageQueue) -> ClientResult<i64>

Source

pub async fn min_offset(&mut self, mq: &MessageQueue) -> ClientResult<i64>

Source

pub async fn earliest_msg_store_time( &mut self, mq: &MessageQueue, ) -> ClientResult<i64>

Source

pub async fn query_message( &mut self, topic: &str, key: &str, max_num: i32, begin: u64, end: u64, ) -> ClientResult<QueryResult>

Source

pub async fn view_message( &mut self, topic: &str, msg_id: &str, ) -> ClientResult<MessageExt>

Source

pub async fn send<M>(&self, msg: M) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_with_timeout<M>( &self, msg: M, timeout: u64, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_with_callback<M, F>( &self, msg: M, send_callback: F, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static,

Source

pub async fn send_with_callback_timeout<F, M>( &self, msg: M, send_callback: F, timeout: u64, ) -> ClientResult<()>
where F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static, M: MessageTrait + Send + Sync,

Source

pub async fn send_oneway<M>(&self, msg: M) -> ClientResult<()>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_to_queue<M>( &self, msg: M, mq: MessageQueue, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_to_queue_with_timeout<M>( &self, msg: M, mq: MessageQueue, timeout: u64, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_to_queue_with_callback<M, F>( &self, msg: M, mq: MessageQueue, send_callback: F, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static,

Source

pub async fn send_to_queue_with_callback_timeout<M, F>( &self, msg: M, mq: MessageQueue, send_callback: F, timeout: u64, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static,

Source

pub async fn send_oneway_to_queue<M>( &self, msg: M, mq: MessageQueue, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_with_selector<M, S, T>( &self, msg: M, selector: S, arg: T, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync, T: Send + Sync,

Source

pub async fn send_with_selector_timeout<M, S, T>( &self, msg: M, selector: S, arg: T, timeout: u64, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync, T: Send + Sync,

Source

pub async fn send_with_selector_callback<M, S, T>( &self, msg: M, selector: S, arg: T, send_callback: Option<ArcSendCallback>, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync, T: Send + Sync,

Source

pub async fn send_with_selector_callback_timeout<M, S, T>( &self, msg: M, selector: S, arg: T, send_callback: Option<ArcSendCallback>, timeout: u64, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, T: Send + Sync + 'static,

Source

pub async fn send_oneway_with_selector<M, S, T>( &self, msg: M, selector: S, arg: T, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, T: Send + Sync + 'static,

Source

pub async fn send_message_in_transaction<T, M>( &self, msg: M, arg: Option<T>, ) -> ClientResult<TransactionSendResult>
where T: Any + Sync + Send, M: MessageTrait + Send + Sync,

Source

pub async fn send_batch<M>(&self, msgs: Vec<M>) -> ClientResult<SendResult>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_batch_with_timeout<M>( &self, msgs: Vec<M>, timeout: u64, ) -> ClientResult<SendResult>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_batch_to_queue<M>( &self, msgs: Vec<M>, mq: MessageQueue, ) -> ClientResult<SendResult>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_batch_to_queue_with_timeout<M>( &self, msgs: Vec<M>, mq: MessageQueue, timeout: u64, ) -> ClientResult<SendResult>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_batch_with_callback<M, F>( &self, msgs: Vec<M>, f: F, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static,

Source

pub async fn send_batch_with_callback_timeout<M, F>( &self, msgs: Vec<M>, f: F, timeout: u64, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static,

Source

pub async fn send_batch_to_queue_with_callback<M, F>( &self, msgs: Vec<M>, mq: MessageQueue, f: F, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static,

Source

pub async fn send_batch_to_queue_with_callback_timeout<M, F>( &self, msgs: Vec<M>, mq: MessageQueue, f: F, timeout: u64, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, F: Fn(Option<&SendResult>, Option<&ClientError>) + Send + Sync + 'static,

Source

pub async fn request<M>( &self, msg: M, timeout: u64, ) -> ClientResult<Box<dyn MessageTrait + Send>>
where M: MessageTrait + Send + Sync,

Source

pub async fn request_with_callback<F, M>( &self, msg: M, request_callback: F, timeout: u64, ) -> ClientResult<()>
where F: Fn(Option<&dyn MessageTrait>, Option<&ClientError>) + Send + Sync + 'static, M: MessageTrait + Send + Sync,

Source

pub async fn request_with_selector<M, S, T>( &self, msg: M, selector: S, arg: T, timeout: u64, ) -> ClientResult<Box<dyn MessageTrait + Send>>
where S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, T: Send + Sync + 'static, M: MessageTrait + Send + Sync,

Source

pub async fn request_with_selector_callback<M, S, T, F>( &self, msg: M, selector: S, arg: T, request_callback: F, timeout: u64, ) -> ClientResult<()>
where S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, F: Fn(Option<&dyn MessageTrait>, Option<&ClientError>) + Send + Sync + 'static, T: Send + Sync + 'static, M: MessageTrait + Send + Sync,

Source

pub async fn request_to_queue<M>( &self, msg: M, mq: MessageQueue, timeout: u64, ) -> ClientResult<Box<dyn MessageTrait + Send>>
where M: MessageTrait + Send + Sync,

Source

pub async fn request_to_queue_with_callback<M, F>( &self, msg: M, mq: MessageQueue, request_callback: F, timeout: u64, ) -> ClientResult<()>
where F: Fn(Option<&dyn MessageTrait>, Option<&ClientError>) + Send + Sync + 'static, M: MessageTrait + Send + Sync,

Source

pub async fn recall_message( &self, topic: impl Into<CheetahString>, recall_handle: impl Into<CheetahString>, ) -> ClientResult<String>

Source

pub fn client_config_snapshot(&self) -> Arc<ClientConfig> ⓘ

Source

pub fn default_mq_producer_impl(&self) -> Option<&Arc<DefaultMQProducerImpl>>

Source

pub fn get_default_mq_producer_impl( &self, ) -> Option<&Arc<DefaultMQProducerImpl>>

Source

pub fn retry_response_codes(&self) -> HashSet<i32>

Source

pub fn get_retry_response_codes(&self) -> HashSet<i32>

Source

pub fn producer_group(&self) -> CheetahString

Source

pub fn get_producer_group(&self) -> CheetahString

Source

pub fn topics(&self) -> Vec<CheetahString>

Source

pub fn get_topics(&self) -> Vec<CheetahString>

Source

pub fn create_topic_key(&self) -> CheetahString

Source

pub fn get_create_topic_key(&self) -> CheetahString

Source

pub fn default_topic_queue_nums(&self) -> u32

Source

pub fn get_default_topic_queue_nums(&self) -> u32

Source

pub fn send_msg_timeout(&self) -> u32

Source

pub fn get_send_msg_timeout(&self) -> u32

Source

pub fn compress_msg_body_over_howmuch(&self) -> u32

Source

pub fn get_compress_msg_body_over_howmuch(&self) -> u32

Source

pub fn retry_times_when_send_failed(&self) -> u32

Source

pub fn get_retry_times_when_send_failed(&self) -> u32

Source

pub fn retry_times_when_send_async_failed(&self) -> u32

Source

pub fn get_retry_times_when_send_async_failed(&self) -> u32

Source

pub fn retry_another_broker_when_not_store_ok(&self) -> bool

Source

pub fn is_retry_another_broker_when_not_store_ok(&self) -> bool

Source

pub fn is_send_message_with_vip_channel(&self) -> bool

Source

pub fn is_send_message_with_vipchannel(&self) -> bool

Source

pub fn max_message_size(&self) -> u32

Source

pub fn get_max_message_size(&self) -> u32

Source

pub fn trace_dispatcher(&self) -> Option<ArcTraceDispatcher>

Source

pub fn get_trace_dispatcher(&self) -> Option<ArcTraceDispatcher>

Source

pub fn auto_batch(&self) -> bool

Source

pub fn produce_accumulator(&self) -> Option<Arc<ProduceAccumulator>>

Source

pub fn enable_backpressure_for_async_mode(&self) -> bool

Source

pub fn is_enable_backpressure_for_async_mode(&self) -> bool

Source

pub fn back_pressure_for_async_send_num(&self) -> u32

Source

pub fn get_back_pressure_for_async_send_num(&self) -> u32

Source

pub fn back_pressure_for_async_send_size(&self) -> u32

Source

pub fn get_back_pressure_for_async_send_size(&self) -> u32

Source

pub fn send_msg_max_timeout_per_request(&self) -> Option<u32>

Source

pub fn get_send_msg_max_timeout_per_request(&self) -> Option<u32>

Source

pub fn batch_max_delay_ms(&self) -> Option<u32>

Source

pub fn get_batch_max_delay_ms(&self) -> Option<u32>

Source

pub fn batch_max_bytes(&self) -> Option<u64>

Source

pub fn get_batch_max_bytes(&self) -> Option<u64>

Source

pub fn total_batch_max_bytes(&self) -> Option<u64>

Source

pub fn get_total_batch_max_bytes(&self) -> Option<u64>

Source

pub fn rpc_hook(&self) -> Option<Arc<dyn RPCHook>>

Source

pub fn compress_level(&self) -> i32

Source

pub fn get_compress_level(&self) -> i32

Source

pub fn compress_type(&self) -> CompressionType

Source

pub fn get_compress_type(&self) -> CompressionType

Source

pub fn compressor(&self) -> Option<&'static (dyn Compressor + Send + Sync)>

Source

pub fn get_compressor(&self) -> Option<&'static (dyn Compressor + Send + Sync)>

Source

pub fn is_use_tls(&self) -> bool

Source

pub fn set_use_tls(&mut self, use_tls: bool)

Source

pub fn set_client_config(&mut self, client_config: ClientConfig)

Source

pub fn set_retry_response_codes(&mut self, retry_response_codes: HashSet<i32>)

Source

pub fn add_retry_response_code(&mut self, response_code: i32)

Source

pub fn set_producer_group(&mut self, producer_group: impl Into<CheetahString>)

Source

pub fn set_topics(&mut self, topics: Vec<CheetahString>)

Source

pub fn set_create_topic_key( &mut self, create_topic_key: impl Into<CheetahString>, )

Source

pub fn set_default_topic_queue_nums(&mut self, default_topic_queue_nums: u32)

Source

pub fn set_send_msg_timeout(&mut self, send_msg_timeout: u32)

Source

pub fn set_compress_msg_body_over_howmuch( &mut self, compress_msg_body_over_howmuch: u32, )

Source

pub fn set_retry_times_when_send_failed( &mut self, retry_times_when_send_failed: u32, )

Source

pub fn set_retry_times_when_send_async_failed( &mut self, retry_times_when_send_async_failed: u32, )

Source

pub fn set_retry_another_broker_when_not_store_ok( &mut self, retry_another_broker_when_not_store_ok: bool, )

Source

pub fn set_send_message_with_vip_channel( &mut self, send_message_with_vip_channel: bool, )

Source

pub fn set_send_message_with_vipchannel( &mut self, send_message_with_vip_channel: bool, )

Source

pub fn set_max_message_size(&mut self, max_message_size: u32)

Source

pub fn set_trace_dispatcher(&mut self, trace_dispatcher: ArcTraceDispatcher)

Source

pub fn set_auto_batch(&mut self, auto_batch: bool)

Source

pub fn set_produce_accumulator( &mut self, produce_accumulator: ProduceAccumulator, )

Source

pub fn set_enable_backpressure_for_async_mode( &mut self, enable_backpressure_for_async_mode: bool, )

Source

pub fn set_back_pressure_for_async_send_num( &mut self, back_pressure_for_async_send_num: u32, )

Source

pub fn set_back_pressure_for_async_send_size( &mut self, back_pressure_for_async_send_size: u32, )

Source

pub fn set_rpc_hook(&mut self, rpc_hook: Arc<dyn RPCHook>)

Source

pub fn set_compress_level(&mut self, compress_level: i32)

Source

pub fn set_compress_type(&mut self, compress_type: CompressionType)

Source

pub fn set_compressor( &mut self, compressor: Option<&'static (dyn Compressor + Send + Sync)>, )

Source

pub fn set_send_msg_max_timeout_per_request(&mut self, timeout: u32)

Source

pub fn set_send_msg_max_timeout_per_request_option( &mut self, timeout: Option<u32>, )

Source

pub fn set_batch_max_delay_ms(&mut self, delay_ms: u32)

Source

pub fn set_batch_max_delay_ms_option(&mut self, delay_ms: Option<u32>)

Source

pub fn set_batch_max_bytes(&mut self, bytes: u64)

Source

pub fn set_batch_max_bytes_option(&mut self, bytes: Option<u64>)

Source

pub fn set_total_batch_max_bytes(&mut self, bytes: u64)

Source

pub fn set_total_batch_max_bytes_option(&mut self, bytes: Option<u64>)

Source

pub fn producer_config_snapshot(&self) -> Arc<ProducerConfig> ⓘ

Returns the current immutable producer configuration snapshot.

Source

pub fn set_send_latency_fault_enable(&mut self, send_latency_fault_enable: bool)

Source

pub fn is_send_latency_fault_enable(&self) -> bool

Source

pub fn set_start_detector_enable(&mut self, start_detector_enable: bool)

Source

pub fn is_start_detector_enable(&self) -> bool

Source

pub fn latency_max(&self) -> Vec<u64>

Source

pub fn get_latency_max(&self) -> Vec<u64>

Source

pub fn set_latency_max(&mut self, latency_max: impl Into<Vec<u64>>)

Source

pub fn not_available_duration(&self) -> Vec<u64>

Source

pub fn get_not_available_duration(&self) -> Vec<u64>

Source

pub fn set_not_available_duration( &mut self, not_available_duration: impl Into<Vec<u64>>, )

Source

pub fn init_produce_accumulator(&mut self)

Source

pub fn set_back_pressure_for_async_send_num_inside_adjust( &mut self, back_pressure_for_async_send_num: u32, )

Source

pub fn set_back_pressure_for_async_send_size_inside_adjust( &mut self, back_pressure_for_async_send_size: u32, )

Source

pub fn get_auto_batch(&self) -> bool

Source

pub async fn send_direct<M>( &self, msg: M, mq: Option<MessageQueue>, send_callback: Option<ArcSendCallback>, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync,

Source

pub async fn send_by_accumulator<M>( &self, msg: M, mq: Option<MessageQueue>, send_callback: Option<ArcSendCallback>, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync + 'static,

Source§

impl DefaultMQProducer

Source

pub fn with_namespace( &self, resource: impl Into<CheetahString>, ) -> CheetahString

Trait Implementations§

Source§

impl ClientSessionProvider for DefaultMQProducer

Source§

impl Clone for DefaultMQProducer

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl MessageQuery for DefaultMQProducer

Source§

async fn query( &mut self, request: ProducerQueryRequest, ) -> ClientResult<ProducerQueryResponse>

Executes one producer query. Read more
Source§

impl MessageRecall for DefaultMQProducer

Source§

async fn recall(&mut self, request: RecallRequest) -> ClientResult<String>

Recalls one message. Read more
Source§

impl MessageSend for DefaultMQProducer

Source§

async fn send_message<M>( &mut self, request: SendRequest<M>, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync,

Sends one message using a closed request contract. Read more
Source§

async fn send_message_batch<M>( &mut self, request: BatchSendRequest<M>, ) -> ClientResult<SendResult>
where M: MessageTrait + Send + Sync,

Sends a batch using a closed request contract. Read more
Source§

async fn send_message_with_callback<M>( &mut self, request: SendCallbackRequest<M>, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync,

Sends one message and reports completion through the supplied callback. Read more
Source§

async fn send_selected<M, S, T>( &mut self, request: SelectedSendRequest<M, S, T>, ) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, T: Send + Sync + 'static,

Sends one message using a queue selector. Read more
Source§

async fn send_selected_with_callback<M, S, T>( &mut self, request: SelectedSendCallbackRequest<M, S, T>, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, T: Send + Sync + 'static,

Sends one selected message and reports completion through a callback. Read more
Source§

async fn send_message_batch_with_callback<M>( &mut self, request: BatchSendCallbackRequest<M>, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync,

Sends a batch and reports completion through a callback. Read more
Source§

impl ProducerLifecycle for DefaultMQProducer

Source§

async fn start_producer(&mut self) -> ClientResult<()>

Starts the producer. Read more
Source§

async fn shutdown_producer(&mut self)

Shuts down producer-owned work.
Source§

impl ProducerTopicAdmin for DefaultMQProducer

Source§

async fn create_topic_request( &mut self, request: TopicCreateRequest, ) -> ClientResult<()>

Creates a topic through the producer’s existing admin facade. Read more
Source§

impl RequestReply for DefaultMQProducer

Source§

async fn request_reply<M>( &mut self, request: RequestReplyRequest<M>, ) -> ClientResult<Box<dyn MessageTrait + Send>>
where M: MessageTrait + Send + Sync,

Sends a request and waits for its correlated reply. Read more
Source§

async fn request_reply_with_callback<M>( &mut self, request: RequestReplyCallbackRequest<M>, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync,

Sends a request and reports its correlated reply through a callback. Read more
Source§

async fn request_reply_selected<M, S, T>( &mut self, request: SelectedRequestReplyRequest<M, S, T>, ) -> ClientResult<Box<dyn MessageTrait + Send>>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, T: Send + Sync + 'static,

Sends a selector-routed request and waits for its reply. Read more
Source§

async fn request_reply_selected_with_callback<M, S, T>( &mut self, request: SelectedRequestReplyCallbackRequest<M, S, T>, ) -> ClientResult<()>
where M: MessageTrait + Send + Sync, S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static, T: Send + Sync + 'static,

Sends a selector-routed request and reports its reply through a callback. 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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. 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> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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: Sized + 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<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