Struct solana_runtime::status_cache::StatusCache [−][src]
Implementations
impl<T: Serialize + Clone> StatusCache<T>
[src]
impl<T: Serialize + Clone> StatusCache<T>
[src]pub fn clear_slot_entries(&mut self, slot: Slot)
[src]
pub fn get_status<K: AsRef<[u8]>>(
&self,
key: K,
transaction_blockhash: &Hash,
ancestors: &Ancestors
) -> Option<(Slot, T)>
[src]
&self,
key: K,
transaction_blockhash: &Hash,
ancestors: &Ancestors
) -> Option<(Slot, T)>
Check if the key is in any of the forks in the ancestors set and with a certain blockhash.
pub fn get_status_any_blockhash<K: AsRef<[u8]>>(
&self,
key: &K,
ancestors: &Ancestors
) -> Option<(Slot, T)>
[src]
&self,
key: &K,
ancestors: &Ancestors
) -> Option<(Slot, T)>
Search for a key with any blockhash Prefer get_status for performance reasons, it doesn’t need to search all blockhashes.
pub fn add_root(&mut self, fork: Slot)
[src]
Add a known root fork. Roots are always valid ancestors. After MAX_CACHE_ENTRIES, roots are removed, and any old keys are cleared.
pub fn roots(&self) -> &HashSet<u64>
[src]
pub fn insert<K: AsRef<[u8]>>(
&mut self,
transaction_blockhash: &Hash,
key: &K,
slot: Slot,
res: T
)
[src]
&mut self,
transaction_blockhash: &Hash,
key: &K,
slot: Slot,
res: T
)
Insert a new key for a specific slot.
pub fn purge_roots(&mut self)
[src]
pub fn clear(&mut self)
[src]
Clear for testing
pub fn slot_deltas(&self, slots: &[Slot]) -> Vec<SlotDelta<T>>
[src]
pub fn append(&mut self, slot_deltas: &[SlotDelta<T>])
[src]
pub fn from_slot_deltas(slot_deltas: &[SlotDelta<T>]) -> Self
[src]
Trait Implementations
impl<T: Serialize + Clone> AbiExample for StatusCache<T>
[src]
impl<T: Serialize + Clone> AbiExample for StatusCache<T>
[src]impl<T: Clone + Serialize> Clone for StatusCache<T>
[src]
impl<T: Clone + Serialize> Clone for StatusCache<T>
[src]fn clone(&self) -> StatusCache<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for StatusCache<T> where
T: RefUnwindSafe,
impl<T> RefUnwindSafe for StatusCache<T> where
T: RefUnwindSafe,
impl<T> Send for StatusCache<T> where
T: Send,
impl<T> Send for StatusCache<T> where
T: Send,
impl<T> Sync for StatusCache<T> where
T: Send + Sync,
impl<T> Sync for StatusCache<T> where
T: Send + Sync,
impl<T> Unpin for StatusCache<T> where
T: Unpin,
impl<T> Unpin for StatusCache<T> where
T: Unpin,
impl<T> UnwindSafe for StatusCache<T> where
T: UnwindSafe,
impl<T> UnwindSafe for StatusCache<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> AbiExample for T
[src]
impl<T> AbiExample for T
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,