pub struct MeshNeighbor {
pub peer_id: String,
pub rssi: Option<i16>,
pub transport: TransportType,
}Expand description
A peer reachable over a direct mesh link.
Fields§
§peer_id: StringUser-level id of the neighbor.
rssi: Option<i16>Signal strength for the link, when the carrier measures one.
transport: TransportTypeThe carrier holding the link.
Implementations§
Source§impl MeshNeighbor
impl MeshNeighbor
Sourcepub fn link_quality(&self) -> u8
pub fn link_quality(&self) -> u8
How good this link is, on a 0–100 scale.
Derived from signal strength where the carrier reports it, and a mid-scale value where it does not — an unmeasured link should not outrank a measured good one, nor be discarded like a measured bad one.
Trait Implementations§
Source§impl Clone for MeshNeighbor
impl Clone for MeshNeighbor
Source§fn clone(&self) -> MeshNeighbor
fn clone(&self) -> MeshNeighbor
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 MeshNeighbor
impl Debug for MeshNeighbor
impl Eq for MeshNeighbor
Source§impl PartialEq for MeshNeighbor
impl PartialEq for MeshNeighbor
impl StructuralPartialEq for MeshNeighbor
Auto Trait Implementations§
impl Freeze for MeshNeighbor
impl RefUnwindSafe for MeshNeighbor
impl Send for MeshNeighbor
impl Sync for MeshNeighbor
impl Unpin for MeshNeighbor
impl UnsafeUnpin for MeshNeighbor
impl UnwindSafe for MeshNeighbor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more