pub enum RocketMQError {
Show 60 variants
Network(NetworkError),
Serialization(SerializationError),
Protocol(ProtocolError),
Rpc(RpcClientError),
Authentication(AuthError),
Controller(ControllerError),
InvalidProperty(String),
BrokerNotFound {
name: String,
},
BrokerRegistrationFailed {
name: String,
reason: String,
},
BrokerOperationFailed {
operation: &'static str,
code: i32,
message: String,
broker_addr: Option<String>,
},
TopicNotExist {
topic: String,
},
QueueNotExist {
topic: String,
queue_id: i32,
},
SubscriptionGroupNotExist {
group: String,
},
QueueIdOutOfRange {
topic: String,
queue_id: i32,
max: i32,
},
MessageTooLarge {
actual: usize,
limit: usize,
},
MessageValidationFailed {
reason: String,
},
RetryLimitExceeded {
group: String,
current: i32,
max: i32,
},
TransactionRejected,
BrokerPermissionDenied {
operation: String,
},
NotMasterBroker {
master_address: String,
},
MessageLookupFailed {
offset: i64,
},
TopicSendingForbidden {
topic: String,
},
BrokerAsyncTaskFailed {
task: &'static str,
context: String,
source: Box<dyn Error + Sync + Send>,
},
RequestBodyInvalid {
operation: &'static str,
reason: String,
},
RequestHeaderError(String),
ResponseProcessFailed {
operation: &'static str,
reason: String,
},
RouteNotFound {
topic: String,
},
RouteInconsistent {
topic: String,
reason: String,
},
RouteRegistrationConflict {
broker_name: String,
reason: String,
},
RouteVersionConflict {
expected: u64,
actual: u64,
},
ClusterNotFound {
cluster: String,
},
ClientNotStarted,
ClientAlreadyStarted,
ClientShuttingDown,
ClientInvalidState {
expected: &'static str,
actual: String,
},
ProducerNotAvailable,
ConsumerNotAvailable,
Tools(ToolsError),
Filter(FilterError),
StorageReadFailed {
path: String,
reason: String,
},
StorageWriteFailed {
path: String,
reason: String,
},
StorageCorrupted {
path: String,
},
StorageOutOfSpace {
path: String,
},
StorageLockFailed {
path: String,
},
ConfigParseFailed {
key: &'static str,
reason: String,
},
ConfigMissing {
key: &'static str,
},
ConfigInvalidValue {
key: &'static str,
value: String,
reason: String,
},
ControllerNotLeader {
leader_id: Option<u64>,
},
ControllerRaftError {
reason: String,
},
ControllerConsensusTimeout {
operation: &'static str,
timeout_ms: u64,
},
ControllerSnapshotFailed {
reason: String,
},
IO(Error),
IllegalArgument(String),
Timeout {
operation: &'static str,
timeout_ms: u64,
},
Internal(String),
Service(ServiceError),
InvalidVersionOrdinal(u32),
Legacy(String),
NotInitialized(String),
MissingRequiredMessageProperty {
property: &'static str,
},
}Expand description
Main error type for all RocketMQ operations
This enum provides a unified error system across all RocketMQ crates. Each variant represents a logical category of errors with rich context information.
§Design Principles
- Semantic: Each error clearly expresses what went wrong
- Performance: Minimal heap allocations, use of &’static str where possible
- Debuggability: Rich context for production debugging
- Ergonomics: Automatic conversions via From trait
§Examples
use rocketmq_error::RocketMQError;
use rocketmq_error::RocketMQResult;
fn send_message(addr: &str) -> RocketMQResult<()> {
// Create a network error
if addr.is_empty() {
return Err(RocketMQError::network_connection_failed(
"localhost:9876",
"empty address",
));
}
Ok(())
}
fn authenticate_user(username: &str) -> RocketMQResult<()> {
// Create an authentication error
if username.is_empty() {
return Err(RocketMQError::user_not_found(""));
}
Ok(())
}Variants§
Network(NetworkError)
Network operation errors (connection, timeout, send/receive failures)
Serialization(SerializationError)
Serialization/deserialization errors (encoding, decoding, format validation)
Protocol(ProtocolError)
RocketMQ protocol errors (invalid commands, version mismatch, etc.)
Rpc(RpcClientError)
RPC client specific errors (broker lookup, request failures, etc.)
Authentication(AuthError)
Authentication/authorization errors (credential validation, access control, etc.)
Controller(ControllerError)
Controller operation errors (Raft consensus, leader election, broker management, etc.)
InvalidProperty(String)
Invalid message property
BrokerNotFound
Broker not found
BrokerRegistrationFailed
Broker registration failed
BrokerOperationFailed
Broker operation failed with error code
TopicNotExist
Topic does not exist
QueueNotExist
Queue does not exist
SubscriptionGroupNotExist
Subscription group not found
QueueIdOutOfRange
Queue ID out of range
MessageTooLarge
Message body too large
MessageValidationFailed
Message validation failed
RetryLimitExceeded
Retry limit exceeded
TransactionRejected
Transaction message rejected
BrokerPermissionDenied
Broker permission denied
NotMasterBroker
Not master broker
MessageLookupFailed
Message lookup failed
TopicSendingForbidden
Topic sending forbidden
BrokerAsyncTaskFailed
Async task failed
RequestBodyInvalid
Request body missing or invalid
RequestHeaderError(String)
Request header missing or invalid
ResponseProcessFailed
Response encoding/decoding failed
RouteNotFound
Route information not found
RouteInconsistent
Route data inconsistency detected
RouteRegistrationConflict
Broker registration conflict
RouteVersionConflict
Route state version conflict
ClusterNotFound
Cluster not found
ClientNotStarted
Client not started
ClientAlreadyStarted
Client already started
ClientShuttingDown
Client is shutting down
ClientInvalidState
Invalid client state
ProducerNotAvailable
Producer not available
ConsumerNotAvailable
Consumer not available
Tools(ToolsError)
Tools and admin operation errors
Filter(FilterError)
Bloom filter and bit array operation errors
StorageReadFailed
Storage read failed
StorageWriteFailed
Storage write failed
StorageCorrupted
Data corruption detected
StorageOutOfSpace
Out of storage space
StorageLockFailed
Storage lock failed
ConfigParseFailed
Configuration parsing failed
ConfigMissing
Required configuration missing
ConfigInvalidValue
Invalid configuration value
ControllerNotLeader
Not the Raft leader
ControllerRaftError
Raft consensus error
ControllerConsensusTimeout
Consensus operation timeout
ControllerSnapshotFailed
Snapshot operation failed
IO(Error)
IO error from std::io
IllegalArgument(String)
Illegal argument
Timeout
Operation timeout
Internal(String)
Internal error (should be rare)
Service(ServiceError)
Service lifecycle error
InvalidVersionOrdinal(u32)
Invalid RocketMQ version ordinal value
Legacy(String)
Use specific error types instead
Legacy error - use specific error types instead
NotInitialized(String)
MissingRequiredMessageProperty
Implementations§
Source§impl RocketMQError
impl RocketMQError
Sourcepub fn network_connection_failed(
addr: impl Into<String>,
reason: impl Into<String>,
) -> RocketMQError
pub fn network_connection_failed( addr: impl Into<String>, reason: impl Into<String>, ) -> RocketMQError
Create a network connection failed error
Sourcepub fn network_timeout(
addr: impl Into<String>,
timeout: Duration,
) -> RocketMQError
pub fn network_timeout( addr: impl Into<String>, timeout: Duration, ) -> RocketMQError
Create a network timeout error
Sourcepub fn network_request_failed(
addr: impl Into<String>,
reason: impl Into<String>,
) -> RocketMQError
pub fn network_request_failed( addr: impl Into<String>, reason: impl Into<String>, ) -> RocketMQError
Create a network request failed error
Sourcepub fn deserialization_failed(
format: &'static str,
reason: impl Into<String>,
) -> RocketMQError
pub fn deserialization_failed( format: &'static str, reason: impl Into<String>, ) -> RocketMQError
Create a deserialization failed error
Sourcepub fn validation_failed(
field: impl Into<String>,
reason: impl Into<String>,
) -> RocketMQError
pub fn validation_failed( field: impl Into<String>, reason: impl Into<String>, ) -> RocketMQError
Create a validation failed error
Sourcepub fn broker_operation_failed(
operation: &'static str,
code: i32,
message: impl Into<String>,
) -> RocketMQError
pub fn broker_operation_failed( operation: &'static str, code: i32, message: impl Into<String>, ) -> RocketMQError
Create a broker operation failed error
Sourcepub fn storage_read_failed(
path: impl Into<String>,
reason: impl Into<String>,
) -> RocketMQError
pub fn storage_read_failed( path: impl Into<String>, reason: impl Into<String>, ) -> RocketMQError
Create a storage read failed error
Sourcepub fn storage_write_failed(
path: impl Into<String>,
reason: impl Into<String>,
) -> RocketMQError
pub fn storage_write_failed( path: impl Into<String>, reason: impl Into<String>, ) -> RocketMQError
Create a storage write failed error
Sourcepub fn illegal_argument(message: impl Into<String>) -> RocketMQError
pub fn illegal_argument(message: impl Into<String>) -> RocketMQError
Create an illegal argument error
Sourcepub fn route_not_found(topic: impl Into<String>) -> RocketMQError
pub fn route_not_found(topic: impl Into<String>) -> RocketMQError
Create a route not found error
Sourcepub fn route_registration_conflict(
broker_name: impl Into<String>,
reason: impl Into<String>,
) -> RocketMQError
pub fn route_registration_conflict( broker_name: impl Into<String>, reason: impl Into<String>, ) -> RocketMQError
Create a route registration conflict error
Sourcepub fn cluster_not_found(cluster: impl Into<String>) -> RocketMQError
pub fn cluster_not_found(cluster: impl Into<String>) -> RocketMQError
Create a cluster not found error
Sourcepub fn request_body_invalid(
operation: &'static str,
reason: impl Into<String>,
) -> RocketMQError
pub fn request_body_invalid( operation: &'static str, reason: impl Into<String>, ) -> RocketMQError
Create a request body invalid error
Sourcepub fn request_header_error(message: impl Into<String>) -> RocketMQError
pub fn request_header_error(message: impl Into<String>) -> RocketMQError
Create a request header error
Sourcepub fn response_process_failed(
operation: &'static str,
reason: impl Into<String>,
) -> RocketMQError
pub fn response_process_failed( operation: &'static str, reason: impl Into<String>, ) -> RocketMQError
Create a response process failed error
Sourcepub fn with_broker_addr(self, addr: impl Into<String>) -> RocketMQError
pub fn with_broker_addr(self, addr: impl Into<String>) -> RocketMQError
Add broker address context to broker operation error
Sourcepub fn validation_error(
field: impl Into<String>,
reason: impl Into<String>,
) -> RocketMQError
pub fn validation_error( field: impl Into<String>, reason: impl Into<String>, ) -> RocketMQError
Create a validation error
Sourcepub fn topic_not_found(topic: impl Into<String>) -> RocketMQError
pub fn topic_not_found(topic: impl Into<String>) -> RocketMQError
Create a topic not found error (alias for TopicNotExist)
Sourcepub fn topic_already_exists(topic: impl Into<String>) -> RocketMQError
pub fn topic_already_exists(topic: impl Into<String>) -> RocketMQError
Create a topic already exists error
Sourcepub fn nameserver_unreachable(addr: impl Into<String>) -> RocketMQError
pub fn nameserver_unreachable(addr: impl Into<String>) -> RocketMQError
Create a nameserver unreachable error
Sourcepub fn nameserver_config_invalid(reason: impl Into<String>) -> RocketMQError
pub fn nameserver_config_invalid(reason: impl Into<String>) -> RocketMQError
Create a nameserver config invalid error
Sourcepub fn not_initialized(reason: impl Into<String>) -> RocketMQError
pub fn not_initialized(reason: impl Into<String>) -> RocketMQError
Create a not initialized error
Sourcepub fn authentication_failed(reason: impl Into<String>) -> RocketMQError
pub fn authentication_failed(reason: impl Into<String>) -> RocketMQError
Create an authentication failed error
Sourcepub fn invalid_credential(reason: impl Into<String>) -> RocketMQError
pub fn invalid_credential(reason: impl Into<String>) -> RocketMQError
Create an invalid credential error
Sourcepub fn user_not_found(username: impl Into<String>) -> RocketMQError
pub fn user_not_found(username: impl Into<String>) -> RocketMQError
Create a user not found error
Sourcepub fn invalid_signature(reason: impl Into<String>) -> RocketMQError
pub fn invalid_signature(reason: impl Into<String>) -> RocketMQError
Create an invalid signature error
Sourcepub fn controller_not_leader(leader_id: Option<u64>) -> RocketMQError
pub fn controller_not_leader(leader_id: Option<u64>) -> RocketMQError
Create a controller not leader error
Sourcepub fn controller_raft_error(reason: impl Into<String>) -> RocketMQError
pub fn controller_raft_error(reason: impl Into<String>) -> RocketMQError
Create a controller Raft error
Sourcepub fn controller_metadata_not_found(key: impl Into<String>) -> RocketMQError
pub fn controller_metadata_not_found(key: impl Into<String>) -> RocketMQError
Create a controller metadata not found error
Sourcepub fn controller_invalid_request(reason: impl Into<String>) -> RocketMQError
pub fn controller_invalid_request(reason: impl Into<String>) -> RocketMQError
Create a controller invalid request error
Sourcepub fn controller_timeout(timeout_ms: u64) -> RocketMQError
pub fn controller_timeout(timeout_ms: u64) -> RocketMQError
Create a controller timeout error
Sourcepub fn controller_shutdown() -> RocketMQError
pub fn controller_shutdown() -> RocketMQError
Create a controller shutdown error
Sourcepub fn filter_empty_bytes() -> RocketMQError
pub fn filter_empty_bytes() -> RocketMQError
Create an empty bytes error
Sourcepub fn filter_invalid_bit_length() -> RocketMQError
pub fn filter_invalid_bit_length() -> RocketMQError
Create an invalid bit length error
Sourcepub fn filter_bit_length_too_small() -> RocketMQError
pub fn filter_bit_length_too_small() -> RocketMQError
Create a bit length too small error
Sourcepub fn filter_bit_position_out_of_bounds(
pos: usize,
max: usize,
) -> RocketMQError
pub fn filter_bit_position_out_of_bounds( pos: usize, max: usize, ) -> RocketMQError
Create a bit position out of bounds error
Sourcepub fn filter_byte_position_out_of_bounds(
pos: usize,
max: usize,
) -> RocketMQError
pub fn filter_byte_position_out_of_bounds( pos: usize, max: usize, ) -> RocketMQError
Create a byte position out of bounds error
Sourcepub fn filter_uninitialized() -> RocketMQError
pub fn filter_uninitialized() -> RocketMQError
Create an uninitialized error
Trait Implementations§
Source§impl Debug for RocketMQError
impl Debug for RocketMQError
Source§impl Display for RocketMQError
impl Display for RocketMQError
Source§impl Error for RocketMQError
impl Error for RocketMQError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AuthError> for RocketMQError
impl From<AuthError> for RocketMQError
Source§fn from(source: AuthError) -> RocketMQError
fn from(source: AuthError) -> RocketMQError
Source§impl From<ConfigError> for RocketMQError
Available on crate feature with_config only.
impl From<ConfigError> for RocketMQError
with_config only.Source§fn from(e: ConfigError) -> RocketMQError
fn from(e: ConfigError) -> RocketMQError
Source§impl From<ControllerError> for RocketMQError
impl From<ControllerError> for RocketMQError
Source§fn from(source: ControllerError) -> RocketMQError
fn from(source: ControllerError) -> RocketMQError
Source§impl From<Error> for RocketMQError
impl From<Error> for RocketMQError
Source§fn from(source: Error) -> RocketMQError
fn from(source: Error) -> RocketMQError
Source§impl From<Error> for RocketMQError
Available on crate feature with_serde only.
impl From<Error> for RocketMQError
with_serde only.Source§fn from(e: Error) -> RocketMQError
fn from(e: Error) -> RocketMQError
Source§impl From<FilterError> for RocketMQError
impl From<FilterError> for RocketMQError
Source§fn from(source: FilterError) -> RocketMQError
fn from(source: FilterError) -> RocketMQError
Source§impl From<NetworkError> for RocketMQError
impl From<NetworkError> for RocketMQError
Source§fn from(source: NetworkError) -> RocketMQError
fn from(source: NetworkError) -> RocketMQError
Source§impl From<ProtocolError> for RocketMQError
impl From<ProtocolError> for RocketMQError
Source§fn from(source: ProtocolError) -> RocketMQError
fn from(source: ProtocolError) -> RocketMQError
Source§impl From<RocketmqError> for RocketMQError
Automatic conversion from legacy RocketmqError to unified RocketMQError
impl From<RocketmqError> for RocketMQError
Automatic conversion from legacy RocketmqError to unified RocketMQError
This allows legacy error-producing code to work with new error-expecting code
Source§fn from(err: RocketmqError) -> RocketMQError
fn from(err: RocketmqError) -> RocketMQError
Source§impl From<RpcClientError> for RocketMQError
impl From<RpcClientError> for RocketMQError
Source§fn from(source: RpcClientError) -> RocketMQError
fn from(source: RpcClientError) -> RocketMQError
Source§impl From<SerializationError> for RocketMQError
impl From<SerializationError> for RocketMQError
Source§fn from(source: SerializationError) -> RocketMQError
fn from(source: SerializationError) -> RocketMQError
Source§impl From<ToolsError> for RocketMQError
impl From<ToolsError> for RocketMQError
Source§fn from(source: ToolsError) -> RocketMQError
fn from(source: ToolsError) -> RocketMQError
Source§impl From<ServiceError> for RocketMQError
impl From<ServiceError> for RocketMQError
Source§fn from(source: ServiceError) -> RocketMQError
fn from(source: ServiceError) -> RocketMQError
Source§impl From<Utf8Error> for RocketMQError
impl From<Utf8Error> for RocketMQError
Source§fn from(e: Utf8Error) -> RocketMQError
fn from(e: Utf8Error) -> RocketMQError
Auto Trait Implementations§
impl Freeze for RocketMQError
impl !RefUnwindSafe for RocketMQError
impl Send for RocketMQError
impl Sync for RocketMQError
impl Unpin for RocketMQError
impl UnsafeUnpin for RocketMQError
impl !UnwindSafe for RocketMQError
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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.Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.