pub struct LegacyContactInfo { /* private fields */ }
Expand description
Structure representing a node on the network
Implementations§
source§impl LegacyContactInfo
impl LegacyContactInfo
pub fn new_localhost(id: &Pubkey, now: u64) -> Self
sourcepub fn new_rand<R: Rng>(rng: &mut R, pubkey: Option<Pubkey>) -> Self
pub fn new_rand<R: Rng>(rng: &mut R, pubkey: Option<Pubkey>) -> Self
New random LegacyContactInfo for tests and simulations.
pub fn new_gossip_entry_point(gossip_addr: &SocketAddr) -> Self
pub fn pubkey(&self) -> &Pubkey
pub fn wallclock(&self) -> u64
pub fn shred_version(&self) -> u16
pub fn set_pubkey(&mut self, pubkey: Pubkey)
pub fn set_wallclock(&mut self, wallclock: u64)
pub fn gossip(&self) -> Result<SocketAddr, Error>
pub fn tvu(&self, protocol: Protocol) -> Result<SocketAddr, Error>
pub fn tpu(&self, protocol: Protocol) -> Result<SocketAddr, Error>
pub fn tpu_forwards(&self, protocol: Protocol) -> Result<SocketAddr, Error>
pub fn tpu_vote(&self) -> Result<SocketAddr, Error>
pub fn rpc(&self) -> Result<SocketAddr, Error>
pub fn rpc_pubsub(&self) -> Result<SocketAddr, Error>
pub fn serve_repair(&self, protocol: Protocol) -> Result<SocketAddr, Error>
pub fn set_gossip<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_rpc<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
sourcepub fn is_valid_address(
addr: &SocketAddr,
socket_addr_space: &SocketAddrSpace
) -> bool
pub fn is_valid_address( addr: &SocketAddr, socket_addr_space: &SocketAddrSpace ) -> bool
port must not be 0 ip must be specified and not multicast loopback ip is only allowed in tests
Trait Implementations§
source§impl AbiExample for LegacyContactInfo
impl AbiExample for LegacyContactInfo
source§impl Clone for LegacyContactInfo
impl Clone for LegacyContactInfo
source§fn clone(&self) -> LegacyContactInfo
fn clone(&self) -> LegacyContactInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, 'b> CrdsEntry<'a, 'b> for &'a LegacyContactInfo
impl<'a, 'b> CrdsEntry<'a, 'b> for &'a LegacyContactInfo
type Key = Pubkey
fn get_entry( table: &'a IndexMap<CrdsValueLabel, VersionedCrdsValue>, key: Self::Key ) -> Option<Self>
source§impl Debug for LegacyContactInfo
impl Debug for LegacyContactInfo
source§impl Default for LegacyContactInfo
impl Default for LegacyContactInfo
source§impl<'de> Deserialize<'de> for LegacyContactInfo
impl<'de> Deserialize<'de> for LegacyContactInfo
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 Hash for LegacyContactInfo
impl Hash for LegacyContactInfo
source§impl Ord for LegacyContactInfo
impl Ord for LegacyContactInfo
source§fn cmp(&self, other: &LegacyContactInfo) -> Ordering
fn cmp(&self, other: &LegacyContactInfo) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LegacyContactInfo
impl PartialEq for LegacyContactInfo
source§fn eq(&self, other: &LegacyContactInfo) -> bool
fn eq(&self, other: &LegacyContactInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LegacyContactInfo
impl PartialOrd for LegacyContactInfo
source§fn partial_cmp(&self, other: &LegacyContactInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &LegacyContactInfo) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for LegacyContactInfo
impl Serialize for LegacyContactInfo
source§impl TryFrom<&ContactInfo> for LegacyContactInfo
impl TryFrom<&ContactInfo> for LegacyContactInfo
impl Eq for LegacyContactInfo
impl StructuralPartialEq for LegacyContactInfo
Auto Trait Implementations§
impl RefUnwindSafe for LegacyContactInfo
impl Send for LegacyContactInfo
impl Sync for LegacyContactInfo
impl Unpin for LegacyContactInfo
impl UnwindSafe for LegacyContactInfo
Blanket Implementations§
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
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<T> CallHasher for T
impl<T> CallHasher for T
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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