#[non_exhaustive]pub enum TxtError {
InvalidKey {
service_type: String,
key: String,
},
StringTooLong {
service_type: String,
key: String,
bytes: usize,
},
NoDeviceId,
InvalidDeviceId(String),
NoRole,
InvalidRole(String),
Missing(&'static str),
InvalidHomieDomain(String),
DuplicateBrokerType(BrokerType),
}Available on crate feature
alloc only.Expand description
A TXT record mDNS cannot carry, or an advertisement that cannot be built.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidKey
A key that is empty, contains =, or is not printable ASCII.
StringTooLong
A key=value string over TXT_STRING_MAX bytes.
Fields
NoDeviceId
An identity with no device id.
InvalidDeviceId(String)
An empty device id, or one containing a comma.
NoRole
An identity with no role.
InvalidRole(String)
An empty role, or one containing a comma.
Missing(&'static str)
A required identity field left empty: manufacturer, model,
serial_number or ebus_version.
InvalidHomieDomain(String)
A Homie domain that is not one topic level.
DuplicateBrokerType(BrokerType)
Two brokers of one type in one advertisement.
Trait Implementations§
impl Eq for TxtError
Source§impl Error for TxtError
impl Error for TxtError
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()
impl StructuralPartialEq for TxtError
Auto Trait Implementations§
impl Freeze for TxtError
impl RefUnwindSafe for TxtError
impl Send for TxtError
impl Sync for TxtError
impl Unpin for TxtError
impl UnsafeUnpin for TxtError
impl UnwindSafe for TxtError
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