pub trait Queryable<T, Q> {
    // Required methods
    fn query(&self, query: Q) -> Option<&T>;
    fn query_mut(&mut self, query: Q) -> Option<&mut T>;
}
Expand description

Allows retrieving an entry from a collection using a custom query type.

Used for querying verification methods in a DID Document by either its full DID Url identifier or only its fragment. See DIDUrlQuery.

Required Methods§

source

fn query(&self, query: Q) -> Option<&T>

Returns a reference to an entry matching the query if one exists.

source

fn query_mut(&mut self, query: Q) -> Option<&mut T>

Returns a mutable reference to an entry matching the query if one exists.

Implementors§

source§

impl<'query, T, Q> Queryable<T, Q> for OrderedSet<T>
where T: KeyComparable, <T as KeyComparable>::Key: AsRef<DIDUrl>, Q: Into<DIDUrlQuery<'query>>,