#[non_exhaustive]pub enum CapabilityError {
RequiresV5 {
feature: &'static str,
},
RequiresPersistentSession {
feature: &'static str,
},
UnsupportedByBackend {
feature: &'static str,
},
}Expand description
A requested feature is not available on the negotiated backend/protocol.
Validated early (at config or publish time) so a capability gap surfaces as one typed error rather than a silent no-op or a backend panic.
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.
RequiresV5
The feature requires MQTT 5; connect with ?protocol=5 (or the
equivalent config) to use it.
RequiresPersistentSession
The feature needs the broker to keep session state across connections;
the requested SessionPolicy discards it.
UnsupportedByBackend
The feature is not supported by the active backend (reserved for the post-0.4 ack-track backends).
Trait Implementations§
Source§impl Debug for CapabilityError
impl Debug for CapabilityError
Source§impl Display for CapabilityError
impl Display for CapabilityError
Source§impl Error for CapabilityError
impl Error for CapabilityError
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<CapabilityError> for MqttClientError
impl From<CapabilityError> for MqttClientError
Source§fn from(source: CapabilityError) -> MqttClientError
fn from(source: CapabilityError) -> MqttClientError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CapabilityError
impl RefUnwindSafe for CapabilityError
impl Send for CapabilityError
impl Sync for CapabilityError
impl Unpin for CapabilityError
impl UnsafeUnpin for CapabilityError
impl UnwindSafe for CapabilityError
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