[−][src]Struct membership::Membership
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
impl Send for Membership
impl Unpin for Membership
impl !Sync for Membership
impl !UnwindSafe for Membership
impl !RefUnwindSafe for Membership
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,