[−][src]Struct solana_core::crds::Crds
Fields
table: IndexMap<CrdsValueLabel, VersionedCrdsValue>
Stores the map of labels and values
Methods
impl Crds
[src]
pub fn new_versioned(
&self,
local_timestamp: u64,
value: CrdsValue
) -> VersionedCrdsValue
[src]
&self,
local_timestamp: u64,
value: CrdsValue
) -> VersionedCrdsValue
must be called atomically with insert_versioned
pub fn insert_versioned(
&mut self,
new_value: VersionedCrdsValue
) -> Result<Option<VersionedCrdsValue>, CrdsError>
[src]
&mut self,
new_value: VersionedCrdsValue
) -> Result<Option<VersionedCrdsValue>, CrdsError>
insert the new value, returns the old value if insert succeeds
pub fn insert(
&mut self,
value: CrdsValue,
local_timestamp: u64
) -> Result<Option<VersionedCrdsValue>, CrdsError>
[src]
&mut self,
value: CrdsValue,
local_timestamp: u64
) -> Result<Option<VersionedCrdsValue>, CrdsError>
pub fn lookup(&self, label: &CrdsValueLabel) -> Option<&CrdsValue>
[src]
pub fn lookup_versioned(
&self,
label: &CrdsValueLabel
) -> Option<&VersionedCrdsValue>
[src]
&self,
label: &CrdsValueLabel
) -> Option<&VersionedCrdsValue>
pub fn update_record_timestamp(&mut self, pubkey: &Pubkey, now: u64)
[src]
Update the timestamp's of all the labels that are assosciated with Pubkey
pub fn find_old_labels(
&self,
now: u64,
timeouts: &HashMap<Pubkey, u64>
) -> Vec<CrdsValueLabel>
[src]
&self,
now: u64,
timeouts: &HashMap<Pubkey, u64>
) -> Vec<CrdsValueLabel>
Find all the keys that are older or equal to the timeout.
- timeouts - Pubkey specific timeouts with Pubkey::default() as the default timeout.
pub fn remove(&mut self, key: &CrdsValueLabel)
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Crds
impl Send for Crds
impl Sync for Crds
impl Unpin for Crds
impl UnwindSafe for Crds
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> From<T> for T
[src]
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,