pub struct NodeContact { /* private fields */ }Expand description
This type relaxes the requirement of having an ENR to connect to a node, to allow for unsigned connection types, such as multiaddrs.
Implementations§
Source§impl NodeContact
impl NodeContact
pub fn new( public_key: CombinedPublicKey, socket_addr: SocketAddr, enr: Option<Enr>, ) -> Self
pub fn node_id(&self) -> NodeId
pub fn seq_no(&self) -> Option<u64>
pub fn public_key(&self) -> CombinedPublicKey
pub fn enr(&self) -> Option<Enr>
pub fn socket_addr(&self) -> SocketAddr
pub fn node_address(&self) -> NodeAddress
pub fn to_address_and_enr(self) -> (NodeAddress, Option<Enr>)
pub fn try_from_enr(enr: Enr, ip_mode: IpMode) -> Result<Self, NonContactable>
Trait Implementations§
Source§impl Clone for NodeContact
impl Clone for NodeContact
Source§fn clone(&self) -> NodeContact
fn clone(&self) -> NodeContact
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NodeContact
impl Debug for NodeContact
Source§impl Display for NodeContact
impl Display for NodeContact
Source§impl PartialEq for NodeContact
impl PartialEq for NodeContact
Source§fn eq(&self, other: &NodeContact) -> bool
fn eq(&self, other: &NodeContact) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NodeContact
Auto Trait Implementations§
impl Freeze for NodeContact
impl RefUnwindSafe for NodeContact
impl Send for NodeContact
impl Sync for NodeContact
impl Unpin for NodeContact
impl UnsafeUnpin for NodeContact
impl UnwindSafe for NodeContact
Blanket Implementations§
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