pub enum QueryResult<V> {
Val(V),
Partial,
Missing,
}
Expand description
The result of querying a [Try] for a particular Key.
Variants§
Val(V)
A leaf value associated with the key used in the query
Partial
The key used to query is a prefix to multiple targets
Missing
The key does not exist within the Trie
Implementations§
Source§impl<V> QueryResult<V>
impl<V> QueryResult<V>
pub fn map<F, U>(self, f: F) -> QueryResult<U>where
F: Fn(V) -> U,
Trait Implementations§
Source§impl<V: Clone> Clone for QueryResult<V>
impl<V: Clone> Clone for QueryResult<V>
Source§fn clone(&self) -> QueryResult<V>
fn clone(&self) -> QueryResult<V>
Returns a duplicate 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<V: Debug> Debug for QueryResult<V>
impl<V: Debug> Debug for QueryResult<V>
Source§impl<V> From<Option<V>> for QueryResult<V>
impl<V> From<Option<V>> for QueryResult<V>
Source§impl<V> From<QueryResult<V>> for Option<V>
impl<V> From<QueryResult<V>> for Option<V>
Source§fn from(q: QueryResult<V>) -> Self
fn from(q: QueryResult<V>) -> Self
Converts to this type from the input type.
Source§impl<V: PartialEq> PartialEq for QueryResult<V>
impl<V: PartialEq> PartialEq for QueryResult<V>
impl<V: Eq> Eq for QueryResult<V>
impl<V> StructuralPartialEq for QueryResult<V>
Auto Trait Implementations§
impl<V> Freeze for QueryResult<V>where
V: Freeze,
impl<V> RefUnwindSafe for QueryResult<V>where
V: RefUnwindSafe,
impl<V> Send for QueryResult<V>where
V: Send,
impl<V> Sync for QueryResult<V>where
V: Sync,
impl<V> Unpin for QueryResult<V>where
V: Unpin,
impl<V> UnwindSafe for QueryResult<V>where
V: UnwindSafe,
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.