Struct TopicFilterBuf
pub struct TopicFilterBuf(MqttString);Available on crate feature
alloc only.Expand description
An owned, validated MQTT topic filter.
This is the owned counterpart to TopicFilter.
Tuple Fields§
§0: MqttStringImplementations§
§impl TopicFilterBuf
impl TopicFilterBuf
pub fn as_topic_filter(&self) -> &TopicFilter
pub fn as_topic_filter(&self) -> &TopicFilter
Returns a borrowed reference to the underlying TopicFilter.
pub fn as_mqtt_str(&self) -> &MqttStr
pub fn as_mqtt_str(&self) -> &MqttStr
Returns the filter as an MqttStr.
Methods from Deref<Target = TopicFilter>§
pub fn as_mqtt_str(&self) -> &MqttStr
pub fn as_mqtt_str(&self) -> &MqttStr
Views the topic filter as an MqttStr.
pub fn has_wildcard(&self) -> bool
pub fn has_wildcard(&self) -> bool
Returns true if the filter contains a + or # wildcard.
Returns true if this is a shared subscription filter ($share/...).
pub fn try_to_owned(&self) -> Result<TopicFilterBuf, TryReserveError>
pub fn try_to_owned(&self) -> Result<TopicFilterBuf, TryReserveError>
Copies the filter into a TopicFilterBuf without panicking if the
allocation fails.
§Errors
Returns TryReserveError if the allocation fails.
Trait Implementations§
§impl AsRef<MqttStr> for TopicFilterBuf
impl AsRef<MqttStr> for TopicFilterBuf
§impl AsRef<TopicFilter> for TopicFilterBuf
impl AsRef<TopicFilter> for TopicFilterBuf
§fn as_ref(&self) -> &TopicFilter
fn as_ref(&self) -> &TopicFilter
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<str> for TopicFilterBuf
impl AsRef<str> for TopicFilterBuf
§impl Borrow<TopicFilter> for TopicFilterBuf
impl Borrow<TopicFilter> for TopicFilterBuf
§fn borrow(&self) -> &TopicFilter
fn borrow(&self) -> &TopicFilter
Immutably borrows from an owned value. Read more
§impl Clone for TopicFilterBuf
impl Clone for TopicFilterBuf
§fn clone(&self) -> TopicFilterBuf
fn clone(&self) -> TopicFilterBuf
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TopicFilterBuf
impl Debug for TopicFilterBuf
§impl Deref for TopicFilterBuf
impl Deref for TopicFilterBuf
§type Target = TopicFilter
type Target = TopicFilter
The resulting type after dereferencing.
§fn deref(&self) -> &TopicFilter
fn deref(&self) -> &TopicFilter
Dereferences the value.
§impl Display for TopicFilterBuf
impl Display for TopicFilterBuf
impl Eq for TopicFilterBuf
§impl From<&TopicFilter> for TopicFilterBuf
impl From<&TopicFilter> for TopicFilterBuf
§fn from(value: &TopicFilter) -> Self
fn from(value: &TopicFilter) -> Self
Converts to this type from the input type.
§impl FromStr for TopicFilterBuf
impl FromStr for TopicFilterBuf
§impl Hash for TopicFilterBuf
impl Hash for TopicFilterBuf
§impl Ord for TopicFilterBuf
impl Ord for TopicFilterBuf
§fn cmp(&self, other: &TopicFilterBuf) -> Ordering
fn cmp(&self, other: &TopicFilterBuf) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
§impl PartialEq for TopicFilterBuf
impl PartialEq for TopicFilterBuf
§impl PartialOrd for TopicFilterBuf
impl PartialOrd for TopicFilterBuf
impl StructuralPartialEq for TopicFilterBuf
§impl TryFrom<&str> for TopicFilterBuf
impl TryFrom<&str> for TopicFilterBuf
§impl TryFrom<MqttString> for TopicFilterBuf
impl TryFrom<MqttString> for TopicFilterBuf
§type Error = TopicError
type Error = TopicError
The type returned in the event of a conversion error.
§fn try_from(value: MqttString) -> Result<Self, Self::Error>
fn try_from(value: MqttString) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for TopicFilterBuf
impl RefUnwindSafe for TopicFilterBuf
impl Send for TopicFilterBuf
impl Sync for TopicFilterBuf
impl Unpin for TopicFilterBuf
impl UnsafeUnpin for TopicFilterBuf
impl UnwindSafe for TopicFilterBuf
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