Struct solana_runtime::secondary_index::SecondaryIndex
source · [−]pub struct SecondaryIndex<SecondaryIndexEntryType: SecondaryIndexEntry + Default + Sync + Send> {
pub index: DashMap<Pubkey, SecondaryIndexEntryType>,
pub reverse_index: DashMap<Pubkey, SecondaryReverseIndexEntry>,
/* private fields */
}
Fields
index: DashMap<Pubkey, SecondaryIndexEntryType>
reverse_index: DashMap<Pubkey, SecondaryReverseIndexEntry>
Implementations
sourceimpl<SecondaryIndexEntryType: SecondaryIndexEntry + Default + Sync + Send> SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType: SecondaryIndexEntry + Default + Sync + Send> SecondaryIndex<SecondaryIndexEntryType>
pub fn new(metrics_name: &'static str) -> Self
pub fn insert(&self, key: &Pubkey, inner_key: &Pubkey)
pub fn remove_by_inner_key(&self, inner_key: &Pubkey)
pub fn get(&self, key: &Pubkey) -> Vec<Pubkey>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Trait Implementations
sourceimpl<SecondaryIndexEntryType: Debug + SecondaryIndexEntry + Default + Sync + Send> Debug for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType: Debug + SecondaryIndexEntry + Default + Sync + Send> Debug for SecondaryIndex<SecondaryIndexEntryType>
sourceimpl<SecondaryIndexEntryType: Default + SecondaryIndexEntry + Default + Sync + Send> Default for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType: Default + SecondaryIndexEntry + Default + Sync + Send> Default for SecondaryIndex<SecondaryIndexEntryType>
sourcefn default() -> SecondaryIndex<SecondaryIndexEntryType>
fn default() -> SecondaryIndex<SecondaryIndexEntryType>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<SecondaryIndexEntryType> !RefUnwindSafe for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType> Send for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType> Sync for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType> Unpin for SecondaryIndex<SecondaryIndexEntryType>
impl<SecondaryIndexEntryType> UnwindSafe for SecondaryIndex<SecondaryIndexEntryType>where
SecondaryIndexEntryType: UnwindSafe,
Blanket Implementations
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more