pub enum ToolsError {
Show 19 variants
TopicNotFound {
topic: String,
},
TopicAlreadyExists {
topic: String,
},
TopicInvalid {
reason: String,
},
ClusterNotFound {
cluster: String,
},
ClusterInvalid {
reason: String,
},
BrokerNotFound {
broker: String,
},
BrokerOffline {
broker: String,
},
ConsumerGroupNotFound {
group: String,
},
ConsumerOffline {
consumer: String,
},
NameServerUnreachable {
addr: String,
},
NameServerConfigInvalid {
reason: String,
},
InvalidConfiguration {
field: String,
reason: String,
},
MissingRequiredField {
field: String,
},
ValidationError {
field: String,
reason: String,
},
ValidationFailed {
message: String,
},
PermissionDenied {
operation: String,
},
InvalidPermission {
value: i32,
allowed: Vec<i32>,
},
OperationTimeout {
operation: String,
duration_ms: u64,
},
Internal {
message: String,
},
}Expand description
Tools-specific errors for admin operations
Variants§
TopicNotFound
Topic not found
TopicAlreadyExists
Topic already exists
TopicInvalid
Invalid topic configuration
ClusterNotFound
Cluster not found
ClusterInvalid
Invalid cluster configuration
BrokerNotFound
Broker not found
BrokerOffline
Broker offline
ConsumerGroupNotFound
Consumer group not found
ConsumerOffline
Consumer offline
NameServerUnreachable
NameServer unreachable
NameServerConfigInvalid
NameServer configuration invalid
InvalidConfiguration
Invalid configuration field
MissingRequiredField
Missing required field
ValidationError
Input validation failed
ValidationFailed
Generic validation error
PermissionDenied
Permission denied for operation
InvalidPermission
Invalid permission value
OperationTimeout
Operation timeout
Internal
Generic internal error
Implementations§
Source§impl ToolsError
impl ToolsError
Sourcepub fn topic_not_found(topic: impl Into<String>) -> Self
pub fn topic_not_found(topic: impl Into<String>) -> Self
Create a topic not found error
Sourcepub fn topic_already_exists(topic: impl Into<String>) -> Self
pub fn topic_already_exists(topic: impl Into<String>) -> Self
Create a topic already exists error
Sourcepub fn cluster_not_found(cluster: impl Into<String>) -> Self
pub fn cluster_not_found(cluster: impl Into<String>) -> Self
Create a cluster not found error
Sourcepub fn broker_not_found(broker: impl Into<String>) -> Self
pub fn broker_not_found(broker: impl Into<String>) -> Self
Create a broker not found error
Sourcepub fn validation_error(
field: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn validation_error( field: impl Into<String>, reason: impl Into<String>, ) -> Self
Create a validation error
Sourcepub fn nameserver_unreachable(addr: impl Into<String>) -> Self
pub fn nameserver_unreachable(addr: impl Into<String>) -> Self
Create a nameserver unreachable error
Sourcepub fn nameserver_config_invalid(reason: impl Into<String>) -> Self
pub fn nameserver_config_invalid(reason: impl Into<String>) -> Self
Create a nameserver config invalid error
Trait Implementations§
Source§impl Debug for ToolsError
impl Debug for ToolsError
Source§impl Display for ToolsError
impl Display for ToolsError
Source§impl Error for ToolsError
impl Error for ToolsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ToolsError> for RocketMQError
impl From<ToolsError> for RocketMQError
Source§fn from(source: ToolsError) -> Self
fn from(source: ToolsError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToolsError
impl RefUnwindSafe for ToolsError
impl Send for ToolsError
impl Sync for ToolsError
impl Unpin for ToolsError
impl UnwindSafe for ToolsError
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
Mutably borrows from an owned value. Read more