pub enum TopicPatternError {
HashPosition {
pattern: String,
},
WildcardUsage {
usage: String,
},
EmptyTopic,
PatternStructureMismatch {
original: String,
custom: String,
},
}
Expand description
Error types for topic pattern parsing
Variants§
HashPosition
Hash wildcard (#) used not at the end of the pattern
WildcardUsage
Wildcard characters (+ or #) used incorrectly
EmptyTopic
Empty topic is not valid
PatternStructureMismatch
Topic pattern structure mismatch when trying to use compatible pattern
Implementations§
Source§impl TopicPatternError
impl TopicPatternError
Sourcepub fn hash_position(pattern: impl Into<String>) -> TopicPatternError
pub fn hash_position(pattern: impl Into<String>) -> TopicPatternError
Creates a new HashPosition error
Sourcepub fn wildcard_usage(usage: impl Into<String>) -> TopicPatternError
pub fn wildcard_usage(usage: impl Into<String>) -> TopicPatternError
Creates a new WildcardUsage error
Sourcepub fn pattern_mismatch(
original: impl Into<String>,
custom: impl Into<String>,
) -> TopicPatternError
pub fn pattern_mismatch( original: impl Into<String>, custom: impl Into<String>, ) -> TopicPatternError
Creates a new PatternStructureMismatch error
Trait Implementations§
Source§impl Clone for TopicPatternError
impl Clone for TopicPatternError
Source§fn clone(&self) -> TopicPatternError
fn clone(&self) -> TopicPatternError
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 TopicPatternError
impl Debug for TopicPatternError
Source§impl Display for TopicPatternError
impl Display for TopicPatternError
Source§impl Error for TopicPatternError
impl Error for TopicPatternError
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<Infallible> for TopicPatternError
impl From<Infallible> for TopicPatternError
Source§fn from(_: Infallible) -> TopicPatternError
fn from(_: Infallible) -> TopicPatternError
Converts to this type from the input type.
Source§impl From<TopicPatternError> for MqttClientError
impl From<TopicPatternError> for MqttClientError
Source§fn from(source: TopicPatternError) -> MqttClientError
fn from(source: TopicPatternError) -> MqttClientError
Converts to this type from the input type.
Source§impl From<TopicPatternError> for TopicError
impl From<TopicPatternError> for TopicError
Source§fn from(source: TopicPatternError) -> TopicError
fn from(source: TopicPatternError) -> TopicError
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 PartialEq for TopicPatternError
impl PartialEq for TopicPatternError
impl Eq for TopicPatternError
impl StructuralPartialEq for TopicPatternError
Auto Trait Implementations§
impl Freeze for TopicPatternError
impl RefUnwindSafe for TopicPatternError
impl Send for TopicPatternError
impl Sync for TopicPatternError
impl Unpin for TopicPatternError
impl UnwindSafe for TopicPatternError
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.