Struct solana_core::crds::Crds [−][src]
Fields
num_inserts: usize
Implementations
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 would_insert(
&self,
value: CrdsValue,
local_timestamp: u64
) -> (bool, VersionedCrdsValue)
[src]
&self,
value: CrdsValue,
local_timestamp: u64
) -> (bool, VersionedCrdsValue)
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 get(&self, label: &CrdsValueLabel) -> Option<&VersionedCrdsValue>
[src]
pub fn get_contact_info(&self, pubkey: Pubkey) -> Option<&ContactInfo>
[src]
pub fn get_lowest_slot(&self, pubkey: Pubkey) -> Option<&LowestSlot>
[src]
pub fn get_nodes(&self) -> impl Iterator<Item = &VersionedCrdsValue>
[src]
Returns all entries which are ContactInfo.
pub fn get_nodes_contact_info(&self) -> impl Iterator<Item = &ContactInfo>
[src]
Returns ContactInfo of all known nodes.
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn values(&self) -> Values<'_, CrdsValueLabel, VersionedCrdsValue>
[src]
pub fn par_values(&self) -> ParValues<'_, CrdsValueLabel, VersionedCrdsValue>
[src]
pub fn filter_bitmask(
&self,
mask: u64,
mask_bits: u32
) -> impl Iterator<Item = &VersionedCrdsValue>
[src]
&self,
mask: u64,
mask_bits: u32
) -> impl Iterator<Item = &VersionedCrdsValue>
Returns all crds values which the first ‘mask_bits’ of their hash value is equal to ‘mask’.
pub fn update_record_timestamp(&mut self, pubkey: &Pubkey, now: u64)
[src]
Update the timestamp’s of all the labels that are associated with Pubkey
pub fn find_old_labels(
&self,
thread_pool: &ThreadPool,
now: u64,
timeouts: &HashMap<Pubkey, u64>
) -> Vec<CrdsValueLabel>
[src]
&self,
thread_pool: &ThreadPool,
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) -> Option<VersionedCrdsValue>
[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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> 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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,