pub struct Query { /* private fields */ }Expand description
A capability lookup.
Every query is scoped to one trust root, because every DHT key is derived from one. There is deliberately no cross-trust-root query.
Implementations§
Source§impl Query
impl Query
Sourcepub const fn exact(
trust_root: TrustRoot,
capability_path: CapabilityPath,
) -> Self
pub const fn exact( trust_root: TrustRoot, capability_path: CapabilityPath, ) -> Self
Creates a query for agents at exactly this capability path.
Sourcepub const fn prefix(
trust_root: TrustRoot,
capability_path: CapabilityPath,
) -> Self
pub const fn prefix( trust_root: TrustRoot, capability_path: CapabilityPath, ) -> Self
Creates a query for agents at this capability path and its descendants.
Sourcepub const fn trust_root(&self) -> &TrustRoot
pub const fn trust_root(&self) -> &TrustRoot
Returns the trust root this query is scoped to.
Sourcepub const fn capability_path(&self) -> &CapabilityPath
pub const fn capability_path(&self) -> &CapabilityPath
Returns the capability path being queried.
Sourcepub const fn match_mode(&self) -> MatchMode
pub const fn match_mode(&self) -> MatchMode
Returns the match mode.
Trait Implementations§
impl Eq for Query
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin for Query
impl UnwindSafe for Query
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