[][src]Struct tendermint_light_client::peer_list::PeerListBuilder

#[must_use]pub struct PeerListBuilder<T> { /* fields omitted */ }

A builder of PeerList with a fluent API.

Implementations

impl<T> PeerListBuilder<T>[src]

pub fn primary(&mut self, peer_id: PeerId, value: T)[src]

Register the given peer id and instance as the primary. Overrides the previous primary if it was already set.

pub fn witness(&mut self, peer_id: PeerId, value: T)[src]

Register the given peer id and value as a witness.

Contracts

Pre-condition: self . primary != Some(peer_id)

pub fn full_node(&mut self, peer_id: PeerId, value: T)[src]

Register the given peer id and value as a full node.

Contracts

Pre-condition: self . primary != Some(peer_id)

pub fn faulty_node(&mut self, peer_id: PeerId, value: T)[src]

Register the given peer id and value as a faulty node.

Contracts

Pre-condition: self . primary != Some(peer_id)

pub fn build(self) -> PeerList<T>[src]

Builds the PeerList.

Precondition

  • A primary has been set with a call to PeerListBuilder::primary.

Contracts

Pre-condition: self . primary . is_some()

Post-condition: PeerList :: invariant(& ret)

Trait Implementations

impl<T> Default for PeerListBuilder<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for PeerListBuilder<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for PeerListBuilder<T> where
    T: Send
[src]

impl<T> Sync for PeerListBuilder<T> where
    T: Sync
[src]

impl<T> Unpin for PeerListBuilder<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for PeerListBuilder<T> where
    T: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,