Skip to main content

BestAvailablePeers

Struct BestAvailablePeers 

Source
pub struct BestAvailablePeers {
    pub count: usize,
    pub reliable: usize,
    pub transient_local: usize,
    pub manual_by_topic: usize,
    pub deadline_min: u32,
    pub deadline_max: u32,
    pub lease_min: u32,
    pub lease_max: u32,
}
Expand description

The discovered peers of one topic, folded down to what QoSProfile::resolve_best_available reads — issue 1973.

A fold rather than a list so a graph walk can feed it one endpoint at a time, with no allocator and no bound on how many endpoints there are.

Fields§

§count: usize

Peers observed.

§reliable: usize

…of which RELIABLE.

§transient_local: usize

…of which TRANSIENT_LOCAL.

§manual_by_topic: usize

…of which MANUAL_BY_TOPIC.

§deadline_min: u32

Smallest finite deadline seen, ms; 0 when none was finite.

§deadline_max: u32

Largest finite deadline seen, ms; 0 when none was finite.

§lease_min: u32

Smallest finite liveliness lease seen, ms; 0 when none was finite.

§lease_max: u32

Largest finite liveliness lease seen, ms; 0 when none was finite.

Implementations§

Source§

impl BestAvailablePeers

Source

pub const NONE: Self

No peers — what a backend with no graph reports.

Source

pub fn observe(&mut self, peer: &QoSProfile)

Fold one discovered endpoint’s profile in.

0, DURATION_INFINITE_MS and the best-available sentinel all read as “no finite window” — upstream’s RMW_QOS_DEADLINE_DEFAULT comparison, widened to our two spellings of infinite.

Trait Implementations§

Source§

impl Clone for BestAvailablePeers

Source§

fn clone(&self) -> BestAvailablePeers

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BestAvailablePeers

Source§

impl Debug for BestAvailablePeers

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BestAvailablePeers

Source§

fn default() -> BestAvailablePeers

Returns the “default value” for a type. Read more
Source§

impl Eq for BestAvailablePeers

Source§

impl PartialEq for BestAvailablePeers

Source§

fn eq(&self, other: &BestAvailablePeers) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BestAvailablePeers

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.