[][src]Struct membership::Membership

pub struct Membership { /* fields omitted */ }

Runs the gossip protocol on an internal thread.

Methods

impl Membership[src]

pub fn new(bind_address: SocketAddr, config: ProtocolConfig) -> Self[src]

Creates new instance communicating with other members through bind_address.

pub fn bind_address(&self) -> SocketAddr[src]

Returns bind address of this member.

pub fn join(&mut self, member: SocketAddr) -> Result<(), Error>[src]

Joins the group through member which has to already belong to the group.

Member might not be instantly spotted by all other members of the group.

pub fn stop(&mut self) -> Result<(), Error>[src]

Stops this member, removing it from the group.

Member does not broadcast that its quiting (at least not yet), thus it may still be observed by others as alive, at least for a short period of time.

pub fn get_members(&self) -> Result<Vec<SocketAddr>, Error>[src]

Returns all alive members of the group this member knows about.

These might not necessary be all alive members in the entire group.

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, 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,