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,
sourcepub fn log_contents(&self)
pub fn log_contents(&self)
log top 20 (owner, # accounts) in descending order of # accounts
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more