pub struct PeerRepeaterEntryView<'a> { /* private fields */ }Expand description
One peer repeater, as a lazily decoded option list.
Every accessor returns None for an option the responder omitted or wrote
in a length this cannot read — a peer that names itself and nothing else is
a legitimate entry, and one bad field is not a reason to drop the rest.
Implementations§
Source§impl<'a> PeerRepeaterEntryView<'a>
impl<'a> PeerRepeaterEntryView<'a>
Sourcepub fn hint(&self) -> Option<&'a [u8]>
pub fn hint(&self) -> Option<&'a [u8]>
The peer’s hint: 3 bytes for a whole node hint, 2 for a router hint. The only required option; an entry without one names nobody.
Sourcepub fn last_heard_min(&self) -> Option<u16>
pub fn last_heard_min(&self) -> Option<u16>
Minutes since the responder last heard the peer.
Sourcepub fn location(&self) -> Option<NodeLocation>
pub fn location(&self) -> Option<NodeLocation>
The peer’s position, in the variable-precision location format.
Trait Implementations§
Source§impl<'a> Clone for PeerRepeaterEntryView<'a>
impl<'a> Clone for PeerRepeaterEntryView<'a>
Source§fn clone(&self) -> PeerRepeaterEntryView<'a>
fn clone(&self) -> PeerRepeaterEntryView<'a>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for PeerRepeaterEntryView<'a>
impl<'a> Debug for PeerRepeaterEntryView<'a>
impl<'a> Copy for PeerRepeaterEntryView<'a>
Auto Trait Implementations§
impl<'a> Freeze for PeerRepeaterEntryView<'a>
impl<'a> RefUnwindSafe for PeerRepeaterEntryView<'a>
impl<'a> Send for PeerRepeaterEntryView<'a>
impl<'a> Sync for PeerRepeaterEntryView<'a>
impl<'a> Unpin for PeerRepeaterEntryView<'a>
impl<'a> UnwindSafe for PeerRepeaterEntryView<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)