Struct solana_gossip::contact_info::ContactInfo
source · pub struct ContactInfo { /* private fields */ }
Implementations§
source§impl ContactInfo
impl ContactInfo
pub fn new(pubkey: Pubkey, wallclock: u64, shred_version: u16) -> 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 set_shred_version(&mut self, shred_version: u16)
pub fn gossip(&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 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 tvu(&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>,
pub fn set_rpc_pubsub<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_serve_repair<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_serve_repair_quic<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_tpu<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_tpu_forwards<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_tpu_vote<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_tvu<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn set_tvu_quic<T>(&mut self, socket: T) -> Result<(), Error>where
SocketAddr: From<T>,
pub fn remove_serve_repair(&mut self)
pub fn remove_tpu(&mut self)
pub fn remove_tpu_forwards(&mut self)
pub fn remove_tvu(&mut self)
pub fn set_socket(&mut self, key: u8, socket: SocketAddr) -> Result<(), Error>
pub fn is_valid_address( addr: &SocketAddr, socket_addr_space: &SocketAddrSpace ) -> bool
pub fn new_localhost(pubkey: &Pubkey, wallclock: u64) -> Self
pub fn new_with_socketaddr(pubkey: &Pubkey, socket: &SocketAddr) -> Self
Trait Implementations§
source§impl Clone for ContactInfo
impl Clone for ContactInfo
source§fn clone(&self) -> ContactInfo
fn clone(&self) -> ContactInfo
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 Debug for ContactInfo
impl Debug for ContactInfo
source§impl<'de> Deserialize<'de> for ContactInfo
impl<'de> Deserialize<'de> for ContactInfo
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 for ContactInfo
impl PartialEq for ContactInfo
source§fn eq(&self, other: &ContactInfo) -> bool
fn eq(&self, other: &ContactInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ContactInfo
impl Serialize for ContactInfo
source§impl TryFrom<&ContactInfo> for LegacyContactInfo
impl TryFrom<&ContactInfo> for LegacyContactInfo
impl Eq for ContactInfo
impl StructuralPartialEq for ContactInfo
Auto Trait Implementations§
impl RefUnwindSafe for ContactInfo
impl Send for ContactInfo
impl Sync for ContactInfo
impl Unpin for ContactInfo
impl UnwindSafe for ContactInfo
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<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