pub trait CrdsEntry<'a, 'b>: Sized {
    type Key;

    // Required method
    fn get_entry(
        table: &'a IndexMap<CrdsValueLabel, VersionedCrdsValue>,
        key: Self::Key
    ) -> Option<Self>;
}
Expand description

Represents types which can be looked up from crds table given a key. e.g. CrdsValueLabel -> VersionedCrdsValue, CrdsValue, CrdsData Pubkey -> ContactInfo, LowestSlot, SnapshotHashes, …

Required Associated Types§

Required Methods§

source

fn get_entry( table: &'a IndexMap<CrdsValueLabel, VersionedCrdsValue>, key: Self::Key ) -> Option<Self>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a CrdsData

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a VersionedCrdsValue

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a CrdsValue

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a LegacyVersion

§

type Key = Pubkey

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a LowestSlot

§

type Key = Pubkey

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a SnapshotHashes

§

type Key = Pubkey

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a Version

§

type Key = Pubkey

source§

impl<'a, 'b> CrdsEntry<'a, 'b> for &'a LegacyContactInfo

§

type Key = Pubkey