Struct TopicFilterBuf
pub struct TopicFilterBuf(MqttString);Expand description
An owned, validated MQTT topic filter.
This is the owned counterpart to TopicFilter.
Tuple Fields§
§0: MqttStringImplementations§
Source§impl TopicFilterBuf
impl TopicFilterBuf
Sourcepub const fn as_topic_filter(&self) -> &TopicFilter
pub const fn as_topic_filter(&self) -> &TopicFilter
Returns a borrowed reference to the underlying TopicFilter.
Sourcepub const fn as_mqtt_str(&self) -> &MqttStr
pub const fn as_mqtt_str(&self) -> &MqttStr
Returns the filter as an MqttStr.
Methods from Deref<Target = TopicFilter>§
Trait Implementations§
Source§impl AsRef<MqttStr> for TopicFilterBuf
impl AsRef<MqttStr> for TopicFilterBuf
Source§impl AsRef<TopicFilter> for TopicFilterBuf
impl AsRef<TopicFilter> for TopicFilterBuf
Source§fn as_ref(&self) -> &TopicFilter
fn as_ref(&self) -> &TopicFilter
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<str> for TopicFilterBuf
impl AsRef<str> for TopicFilterBuf
Source§impl Borrow<TopicFilter> for TopicFilterBuf
impl Borrow<TopicFilter> for TopicFilterBuf
Source§fn borrow(&self) -> &TopicFilter
fn borrow(&self) -> &TopicFilter
Immutably borrows from an owned value. Read more
Source§impl Clone for TopicFilterBuf
impl Clone for TopicFilterBuf
Source§fn clone(&self) -> TopicFilterBuf
fn clone(&self) -> TopicFilterBuf
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 TopicFilterBuf
impl Debug for TopicFilterBuf
Source§impl Deref for TopicFilterBuf
impl Deref for TopicFilterBuf
Source§type Target = TopicFilter
type Target = TopicFilter
The resulting type after dereferencing.
Source§fn deref(&self) -> &TopicFilter
fn deref(&self) -> &TopicFilter
Dereferences the value.
Source§impl Display for TopicFilterBuf
impl Display for TopicFilterBuf
Source§impl From<&TopicFilter> for TopicFilterBuf
impl From<&TopicFilter> for TopicFilterBuf
Source§fn from(value: &TopicFilter) -> TopicFilterBuf
fn from(value: &TopicFilter) -> TopicFilterBuf
Converts to this type from the input type.
Source§impl FromStr for TopicFilterBuf
impl FromStr for TopicFilterBuf
Source§type Err = ParseTopicError
type Err = ParseTopicError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<TopicFilterBuf, <TopicFilterBuf as FromStr>::Err>
fn from_str(s: &str) -> Result<TopicFilterBuf, <TopicFilterBuf as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for TopicFilterBuf
impl Hash for TopicFilterBuf
Source§impl Ord for TopicFilterBuf
impl Ord for TopicFilterBuf
Source§fn cmp(&self, other: &TopicFilterBuf) -> Ordering
fn cmp(&self, other: &TopicFilterBuf) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TopicFilterBuf
impl PartialEq for TopicFilterBuf
Source§impl PartialOrd for TopicFilterBuf
impl PartialOrd for TopicFilterBuf
Source§impl TryFrom<&str> for TopicFilterBuf
impl TryFrom<&str> for TopicFilterBuf
Source§type Error = ParseTopicError
type Error = ParseTopicError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<TopicFilterBuf, <TopicFilterBuf as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<TopicFilterBuf, <TopicFilterBuf as TryFrom<&str>>::Error>
Performs the conversion.
Source§impl TryFrom<MqttString> for TopicFilterBuf
impl TryFrom<MqttString> for TopicFilterBuf
Source§type Error = TopicError
type Error = TopicError
The type returned in the event of a conversion error.
Source§fn try_from(
value: MqttString,
) -> Result<TopicFilterBuf, <TopicFilterBuf as TryFrom<MqttString>>::Error>
fn try_from( value: MqttString, ) -> Result<TopicFilterBuf, <TopicFilterBuf as TryFrom<MqttString>>::Error>
Performs the conversion.
Source§impl TryFrom<String> for TopicFilterBuf
impl TryFrom<String> for TopicFilterBuf
Source§type Error = ParseTopicError
type Error = ParseTopicError
The type returned in the event of a conversion error.
Source§fn try_from(
s: String,
) -> Result<TopicFilterBuf, <TopicFilterBuf as TryFrom<String>>::Error>
fn try_from( s: String, ) -> Result<TopicFilterBuf, <TopicFilterBuf as TryFrom<String>>::Error>
Performs the conversion.
impl Eq for TopicFilterBuf
impl StructuralPartialEq for TopicFilterBuf
Auto Trait Implementations§
impl Freeze for TopicFilterBuf
impl RefUnwindSafe for TopicFilterBuf
impl Send for TopicFilterBuf
impl Sync for TopicFilterBuf
impl Unpin for TopicFilterBuf
impl UnwindSafe for TopicFilterBuf
Blanket Implementations§
§impl<T> AsUncased for T
impl<T> AsUncased for T
§fn as_uncased(&self) -> &UncasedStr
fn as_uncased(&self) -> &UncasedStr
Convert
self to an [UncasedStr].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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more