pub enum PublishTopic {
Unvalidated(String),
Validated(ValidatedTopic),
}Expand description
Topic argument accepted by publish APIs.
ValidatedTopic variants skip per-call validation while string variants are
validated for MQTT topic correctness.
Variants§
Unvalidated(String)
Raw topic input that must be validated before publishing.
Validated(ValidatedTopic)
Topic that has already been validated once.
Trait Implementations§
Source§impl From<&String> for PublishTopic
impl From<&String> for PublishTopic
Source§fn from(topic: &String) -> PublishTopic
fn from(topic: &String) -> PublishTopic
Converts to this type from the input type.
Source§impl From<&str> for PublishTopic
impl From<&str> for PublishTopic
Source§fn from(topic: &str) -> PublishTopic
fn from(topic: &str) -> PublishTopic
Converts to this type from the input type.
Source§impl From<String> for PublishTopic
impl From<String> for PublishTopic
Source§fn from(topic: String) -> PublishTopic
fn from(topic: String) -> PublishTopic
Converts to this type from the input type.
Source§impl From<ValidatedTopic> for PublishTopic
impl From<ValidatedTopic> for PublishTopic
Source§fn from(topic: ValidatedTopic) -> PublishTopic
fn from(topic: ValidatedTopic) -> PublishTopic
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PublishTopic
impl RefUnwindSafe for PublishTopic
impl Send for PublishTopic
impl Sync for PublishTopic
impl Unpin for PublishTopic
impl UnsafeUnpin for PublishTopic
impl UnwindSafe for PublishTopic
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