pub struct Registration { /* private fields */ }Expand description
Implementations§
Source§impl Registration
impl Registration
pub fn new() -> Self
pub fn with_actions( self, actions: impl IntoIterator<Item = (Nsid, Action, TargetType<'static>)>, ) -> Self
pub fn with_actions_without_profile( self, actions: impl IntoIterator<Item = (Action, TargetType<'static>)>, ) -> Self
Sourcepub fn profiles(&self) -> impl Iterator<Item = &Nsid>
pub fn profiles(&self) -> impl Iterator<Item = &Nsid>
Returns the profiles this consumer supports. This could be empty if the consumer only supports actions without profiles.
Sourcepub fn matches(
&self,
action: Action,
target: &TargetType<'_>,
profile: &Nsid,
) -> bool
pub fn matches( &self, action: Action, target: &TargetType<'_>, profile: &Nsid, ) -> bool
Checks if this registration matches the given action, target type, and profile.
pub fn query_features(&self, features: &Features) -> Response
Trait Implementations§
Source§impl Clone for Registration
impl Clone for Registration
Source§fn clone(&self) -> Registration
fn clone(&self) -> Registration
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 moreSource§impl Default for Registration
impl Default for Registration
Source§fn default() -> Registration
fn default() -> Registration
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Registration
impl RefUnwindSafe for Registration
impl Send for Registration
impl Sync for Registration
impl Unpin for Registration
impl UnsafeUnpin for Registration
impl UnwindSafe for Registration
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