pub enum CacheLookup {
NotFound,
One(String, CachedMessageRef),
Ambiguous(Vec<(String, CachedMessageRef)>),
}Expand description
Result of looking up a fragment against the cache.
Variants§
NotFound
One(String, CachedMessageRef)
Ambiguous(Vec<(String, CachedMessageRef)>)
Two or more entries match the fragment.
The inner vec is capped at 10 entries by MessageCache::find_by_fragment
to keep error messages readable. If more than 10 entries actually match,
only the first 10 are surfaced — callers should ask the user for a
longer fragment rather than try to enumerate all candidates.
Trait Implementations§
Source§impl Clone for CacheLookup
impl Clone for CacheLookup
Source§fn clone(&self) -> CacheLookup
fn clone(&self) -> CacheLookup
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 Debug for CacheLookup
impl Debug for CacheLookup
Source§impl PartialEq for CacheLookup
impl PartialEq for CacheLookup
Source§fn eq(&self, other: &CacheLookup) -> bool
fn eq(&self, other: &CacheLookup) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CacheLookup
impl StructuralPartialEq for CacheLookup
Auto Trait Implementations§
impl Freeze for CacheLookup
impl RefUnwindSafe for CacheLookup
impl Send for CacheLookup
impl Sync for CacheLookup
impl Unpin for CacheLookup
impl UnsafeUnpin for CacheLookup
impl UnwindSafe for CacheLookup
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.