pub enum TopicError {
Empty,
TooLong(usize),
ReservedPrefix(&'static str),
NotUtf8(Utf8Error),
}Expand description
Why a topic name failed validation.
Variants§
Empty
The name is empty.
TooLong(usize)
The name holds more than Topic::MAX_LEN octets. The field is its
length in octets.
ReservedPrefix(&'static str)
The name starts with a reserved command prefix.
NotUtf8(Utf8Error)
The name bytes are not valid UTF-8.
Trait Implementations§
Source§impl Clone for TopicError
impl Clone for TopicError
Source§impl Debug for TopicError
impl Debug for TopicError
Source§impl Display for TopicError
impl Display for TopicError
impl Eq for TopicError
Source§impl Error for TopicError
impl Error for TopicError
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<Utf8Error> for TopicError
impl From<Utf8Error> for TopicError
Source§impl PartialEq for TopicError
impl PartialEq for TopicError
impl StructuralPartialEq for TopicError
Auto Trait Implementations§
impl Forget for TopicError
impl Freeze for TopicError
impl Move for TopicError
impl RefUnwindSafe for TopicError
impl Send for TopicError
impl Sync for TopicError
impl Unpin for TopicError
impl UnsafeUnpin for TopicError
impl UnwindSafe for TopicError
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