pub struct Netinfo { /* private fields */ }
Expand description
The netinfo message ends channel negotiation.
It tells the other party on the channel our view of the current time, our own list of public addresses, and our view of its address.
When we get a netinfo cell, we can start creating circuits on a channel and sending data.
Implementations
sourceimpl Netinfo
impl Netinfo
sourcepub fn for_client(their_addr: Option<IpAddr>) -> Self
pub fn for_client(their_addr: Option<IpAddr>) -> Self
Construct a new Netinfo to be sent by a client.
sourcepub fn for_relay<V>(
timestamp: u32,
their_addr: Option<IpAddr>,
my_addrs: V
) -> Self where
V: Into<Vec<IpAddr>>,
pub fn for_relay<V>(
timestamp: u32,
their_addr: Option<IpAddr>,
my_addrs: V
) -> Self where
V: Into<Vec<IpAddr>>,
Construct a new Netinfo to be sent by a relay
sourcepub fn timestamp(&self) -> Option<SystemTime>
pub fn timestamp(&self) -> Option<SystemTime>
Return the time reported in this NETINFO cell.
Trait Implementations
sourceimpl Body for Netinfo
impl Body for Netinfo
sourcefn into_message(self) -> ChanMsg
fn into_message(self) -> ChanMsg
Convert this type into a ChanMsg, wrapped as appropriate.
Auto Trait Implementations
impl RefUnwindSafe for Netinfo
impl Send for Netinfo
impl Sync for Netinfo
impl Unpin for Netinfo
impl UnwindSafe for Netinfo
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more