pub struct LookupIndex { /* private fields */ }Implementations§
Source§impl LookupIndex
impl LookupIndex
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn lookup(&self, lookup_value: &Value) -> Option<Value>
pub fn insert(&self, lookup_value: Value, primary_key: Value)
Sourcepub fn remove(&self, lookup_value: &Value)
pub fn remove(&self, lookup_value: &Value)
Remove an entry by lookup value. Used when a PDA mapping changes to clear stale entries that would otherwise shadow the updated PDA mapping.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for LookupIndex
impl Debug for LookupIndex
Auto Trait Implementations§
impl !Freeze for LookupIndex
impl RefUnwindSafe for LookupIndex
impl Send for LookupIndex
impl Sync for LookupIndex
impl Unpin for LookupIndex
impl UnsafeUnpin for LookupIndex
impl UnwindSafe for LookupIndex
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