pub struct Init {
pub features: InitFeatures,
pub remote_network_address: Option<NetAddress>,
}
Expand description
An init message to be sent or received from a peer
Fields
features: InitFeatures
The relevant features which the sender supports
remote_network_address: Option<NetAddress>
The receipient’s network address. This adds the option to report a remote IP address back to a connecting peer using the init message. A node can decide to use that information to discover a potential update to its public IPv4 address (NAT) and use that for a node_announcement update message containing the new address.
Trait Implementations
sourceimpl Writeable for Init
impl Writeable for Init
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
impl StructuralPartialEq for Init
Auto Trait Implementations
impl RefUnwindSafe for Init
impl Send for Init
impl Sync for Init
impl Unpin for Init
impl UnwindSafe for Init
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more