[][src]Struct poldercast::NodeProfile

pub struct NodeProfile { /* fields omitted */ }

The profile of the node, its Id, its Address and its Subscriptions.

This is the information that is created and propagated by the Node itself.

Methods

impl NodeProfile[src]

pub fn id(&self) -> &Id[src]

pub fn address(&self) -> Option<&Address>[src]

pub fn subscriptions(&self) -> &Subscriptions[src]

pub fn common_subscriptions<'a>(
    &'a self,
    other: &'a Self
) -> impl Iterator<Item = &'a Subscription>
[src]

list all common subscriptions between the two nodes

pub fn proximity(&self, other: &Self) -> Proximity[src]

compute the relative proximity between these 2 nodes.

This is based on the subscription. The more 2 nodes have subscription in common the closer they are.

pub fn check(&self) -> bool[src]

Trait Implementations

impl Clone for NodeProfile[src]

impl Eq for NodeProfile[src]

impl PartialEq<NodeProfile> for NodeProfile[src]

impl Debug for NodeProfile[src]

impl Hash for NodeProfile[src]

impl StructuralPartialEq for NodeProfile[src]

impl StructuralEq for NodeProfile[src]

impl Serialize for NodeProfile[src]

impl<'de> Deserialize<'de> for NodeProfile[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]