pub enum TopicRouterError {
InvalidPattern(TopicPatternError),
MatchingFailed(TopicMatcherError),
SubscriptionNotFound {
id: SubscriptionId,
},
InvalidRoutingTopic {
topic: String,
reason: String,
},
InternalStateCorrupted {
details: String,
},
}
Expand description
Errors that can occur during topic routing operations
Variants§
InvalidPattern(TopicPatternError)
Topic pattern validation failed
MatchingFailed(TopicMatcherError)
Topic matching operation failed
SubscriptionNotFound
Subscription with given ID was not found
Fields
§
id: SubscriptionId
InvalidRoutingTopic
Topic is invalid for routing operations
InternalStateCorrupted
Internal state corruption detected
Implementations§
Source§impl TopicRouterError
impl TopicRouterError
Sourcepub fn subscription_not_found(id: SubscriptionId) -> TopicRouterError
pub fn subscription_not_found(id: SubscriptionId) -> TopicRouterError
Creates a new SubscriptionNotFound error
Sourcepub fn invalid_routing_topic(
topic: impl Into<String>,
reason: impl Into<String>,
) -> TopicRouterError
pub fn invalid_routing_topic( topic: impl Into<String>, reason: impl Into<String>, ) -> TopicRouterError
Creates a new InvalidRoutingTopic error
Sourcepub fn internal_state_corrupted(details: impl Into<String>) -> TopicRouterError
pub fn internal_state_corrupted(details: impl Into<String>) -> TopicRouterError
Creates a new InternalStateCorrupted error
Trait Implementations§
Source§impl Clone for TopicRouterError
impl Clone for TopicRouterError
Source§fn clone(&self) -> TopicRouterError
fn clone(&self) -> TopicRouterError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TopicRouterError
impl Debug for TopicRouterError
Source§impl Display for TopicRouterError
impl Display for TopicRouterError
Source§impl Error for TopicRouterError
impl Error for TopicRouterError
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<TopicMatcherError> for TopicRouterError
impl From<TopicMatcherError> for TopicRouterError
Source§fn from(source: TopicMatcherError) -> TopicRouterError
fn from(source: TopicMatcherError) -> TopicRouterError
Converts to this type from the input type.
Source§impl From<TopicPatternError> for TopicRouterError
impl From<TopicPatternError> for TopicRouterError
Source§fn from(source: TopicPatternError) -> TopicRouterError
fn from(source: TopicPatternError) -> TopicRouterError
Converts to this type from the input type.
Source§impl From<TopicRouterError> for TopicError
impl From<TopicRouterError> for TopicError
Source§fn from(source: TopicRouterError) -> TopicError
fn from(source: TopicRouterError) -> TopicError
Converts to this type from the input type.
Source§impl PartialEq for TopicRouterError
impl PartialEq for TopicRouterError
impl Eq for TopicRouterError
impl StructuralPartialEq for TopicRouterError
Auto Trait Implementations§
impl Freeze for TopicRouterError
impl RefUnwindSafe for TopicRouterError
impl Send for TopicRouterError
impl Sync for TopicRouterError
impl Unpin for TopicRouterError
impl UnwindSafe for TopicRouterError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.