[][src]Struct tendermint_light_client::builder::LightClientBuilder

#[must_use]pub struct LightClientBuilder<State> { /* fields omitted */ }

Builder for a light client Instance

Implementations

impl LightClientBuilder<NoTrustedState>[src]

pub fn prod(
    peer_id: PeerId,
    rpc_client: HttpClient,
    light_store: Box<dyn LightStore>,
    options: Options,
    timeout: Option<Duration>
) -> Self
[src]

Initialize a builder for a production (non-mock) light client.

pub fn custom(
    peer_id: PeerId,
    options: Options,
    light_store: Box<dyn LightStore>,
    io: Box<dyn Io>,
    hasher: Box<dyn Hasher>,
    clock: Box<dyn Clock>,
    verifier: Box<dyn Verifier>,
    scheduler: Box<dyn Scheduler>,
    predicates: Box<dyn VerificationPredicates>
) -> Self
[src]

Initialize a builder for a custom light client, by providing all dependencies upfront.

pub fn trust_from_store(
    self
) -> Result<LightClientBuilder<HasTrustedState>, Error>
[src]

Keep using the latest verified or trusted block in the light store. Such a block must exists otherwise this will fail.

pub fn trust_primary_at(
    self,
    trusted_height: Height,
    trusted_hash: Hash
) -> Result<LightClientBuilder<HasTrustedState>, Error>
[src]

Set the block from the primary peer at the given height as the trusted state.

impl LightClientBuilder<HasTrustedState>[src]

#[must_use]pub fn build(self) -> Instance[src]

Build the light client Instance.

Auto Trait Implementations

impl<State> !RefUnwindSafe for LightClientBuilder<State>[src]

impl<State> Send for LightClientBuilder<State> where
    State: Send
[src]

impl<State> Sync for LightClientBuilder<State> where
    State: Sync
[src]

impl<State> Unpin for LightClientBuilder<State> where
    State: Unpin
[src]

impl<State> !UnwindSafe for LightClientBuilder<State>[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>,