Struct solana_gossip::crds_value::CrdsValue
source · pub struct CrdsValue {
pub signature: Signature,
pub data: CrdsData,
}
Expand description
CrdsValue that is replicated across the cluster
Fields§
§signature: Signature
§data: CrdsData
Implementations§
source§impl CrdsValue
impl CrdsValue
pub fn new_unsigned(data: CrdsData) -> Self
pub fn new_signed(data: CrdsData, keypair: &Keypair) -> Self
sourcepub fn new_rand<R: Rng>(rng: &mut R, keypair: Option<&Keypair>) -> CrdsValue
pub fn new_rand<R: Rng>(rng: &mut R, keypair: Option<&Keypair>) -> CrdsValue
New random CrdsValue for tests and benchmarks.
sourcepub fn wallclock(&self) -> u64
pub fn wallclock(&self) -> u64
Totally unsecure unverifiable wallclock of the node that generated this message Latest wallclock is always picked. This is used to time out push messages.
pub fn pubkey(&self) -> Pubkey
pub fn label(&self) -> CrdsValueLabel
pub fn contact_info(&self) -> Option<&LegacyContactInfo>
Trait Implementations§
source§impl<'a, 'b> CrdsEntry<'a, 'b> for &'a CrdsValue
impl<'a, 'b> CrdsEntry<'a, 'b> for &'a CrdsValue
type Key = &'b CrdsValueLabel
fn get_entry( table: &'a IndexMap<CrdsValueLabel, VersionedCrdsValue>, key: Self::Key ) -> Option<Self>
source§impl<'de> Deserialize<'de> for CrdsValue
impl<'de> Deserialize<'de> for CrdsValue
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<CrdsValue> for CrdsValue
impl PartialEq<CrdsValue> for CrdsValue
impl Eq for CrdsValue
impl StructuralEq for CrdsValue
impl StructuralPartialEq for CrdsValue
Auto Trait Implementations§
impl RefUnwindSafe for CrdsValue
impl Send for CrdsValue
impl Sync for CrdsValue
impl Unpin for CrdsValue
impl UnwindSafe for CrdsValue
Blanket Implementations§
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request