Struct zbus::OwnedMatchRule
source · pub struct OwnedMatchRule(/* private fields */);
Expand description
Owned sibling of MatchRule
.
Implementations§
Methods from Deref<Target = MatchRule<'static>>§
sourcepub fn msg_type(&self) -> Option<MessageType>
pub fn msg_type(&self) -> Option<MessageType>
The message type, if set.
sourcepub fn interface(&self) -> Option<&InterfaceName<'_>>
pub fn interface(&self) -> Option<&InterfaceName<'_>>
The interfac, if set.
sourcepub fn member(&self) -> Option<&MemberName<'_>>
pub fn member(&self) -> Option<&MemberName<'_>>
The member name if set.
sourcepub fn path_spec(&self) -> Option<&MatchRulePathSpec<'_>>
pub fn path_spec(&self) -> Option<&MatchRulePathSpec<'_>>
The path or path namespace, if set.
sourcepub fn destination(&self) -> Option<&UniqueName<'_>>
pub fn destination(&self) -> Option<&UniqueName<'_>>
The destination, if set.
sourcepub fn arg_paths(&self) -> &[(u8, ObjectPath<'_>)]
pub fn arg_paths(&self) -> &[(u8, ObjectPath<'_>)]
The argument paths.
sourcepub fn arg0namespace(&self) -> Option<&InterfaceName<'_>>
👎Deprecated: use arg0ns instead
pub fn arg0namespace(&self) -> Option<&InterfaceName<'_>>
Match messages whose first argument is within the specified namespace.
This function is deprecated because the choice of InterfaceName
was too restrictive.
sourcepub fn arg0ns(&self) -> Option<&Str<'m>>
pub fn arg0ns(&self) -> Option<&Str<'m>>
Match messages whose first argument is within the specified namespace.
sourcepub fn matches(&self, msg: &Message) -> Result<bool>
pub fn matches(&self, msg: &Message) -> Result<bool>
Match the given message against this rule.
§Caveats
Since this method doesn’t have any knowledge of names on the bus (or even connection to a bus) matching always succeeds for:
sender
in the rule (if set) that is a well-known name. Thesender
on a message is always a unique name.destination
in the rule whendestination
on themsg
is a well-known name. Thedestination
on match rule is always a unique name.
Trait Implementations§
source§impl Clone for OwnedMatchRule
impl Clone for OwnedMatchRule
source§fn clone(&self) -> OwnedMatchRule
fn clone(&self) -> OwnedMatchRule
Returns a copy 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 OwnedMatchRule
impl Debug for OwnedMatchRule
source§impl Deref for OwnedMatchRule
impl Deref for OwnedMatchRule
source§impl<'de> Deserialize<'de> for OwnedMatchRule
impl<'de> Deserialize<'de> for OwnedMatchRule
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'unowned, 'owned: 'unowned> From<&'owned OwnedMatchRule> for MatchRule<'unowned>
impl<'unowned, 'owned: 'unowned> From<&'owned OwnedMatchRule> for MatchRule<'unowned>
source§fn from(rule: &'owned OwnedMatchRule) -> Self
fn from(rule: &'owned OwnedMatchRule) -> Self
Converts to this type from the input type.
source§impl From<MatchRule<'_>> for OwnedMatchRule
impl From<MatchRule<'_>> for OwnedMatchRule
source§impl From<OwnedMatchRule> for MatchRule<'static>
impl From<OwnedMatchRule> for MatchRule<'static>
source§fn from(o: OwnedMatchRule) -> Self
fn from(o: OwnedMatchRule) -> Self
Converts to this type from the input type.
source§impl Hash for OwnedMatchRule
impl Hash for OwnedMatchRule
source§impl PartialEq<MatchRule<'_>> for OwnedMatchRule
impl PartialEq<MatchRule<'_>> for OwnedMatchRule
source§impl PartialEq for OwnedMatchRule
impl PartialEq for OwnedMatchRule
source§impl Serialize for OwnedMatchRule
impl Serialize for OwnedMatchRule
source§impl TryFrom<&str> for OwnedMatchRule
impl TryFrom<&str> for OwnedMatchRule
source§impl Type for OwnedMatchRule
impl Type for OwnedMatchRule
impl Eq for OwnedMatchRule
impl StructuralPartialEq for OwnedMatchRule
Auto Trait Implementations§
impl Freeze for OwnedMatchRule
impl RefUnwindSafe for OwnedMatchRule
impl Send for OwnedMatchRule
impl Sync for OwnedMatchRule
impl Unpin for OwnedMatchRule
impl UnwindSafe for OwnedMatchRule
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<'de, T> DynamicDeserialize<'de> for T
impl<'de, T> DynamicDeserialize<'de> for T
source§type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
source§fn deserializer_for_signature<S>(
signature: S,
) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
fn deserializer_for_signature<S>( signature: S, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
Get a deserializer compatible with this signature.
source§impl<T> DynamicType for T
impl<T> DynamicType for T
source§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more