Skip to main content

TipSource

Trait TipSource 

Source
pub trait TipSource: MaybeSend + MaybeSync {
    // Required method
    fn tip_ref(&self) -> impl Future<Output = Result<BlockRef>> + MaybeSend;
}
Expand description

A backend the tip watcher can fetch the current chain tip from.

Implementors can use a plain async fn tip_ref. The MaybeSend bounds require Send futures on native platforms only; on WASM the runtime is single-threaded and HTTP client futures aren’t Send.

Required Methods§

Source

fn tip_ref(&self) -> impl Future<Output = Result<BlockRef>> + MaybeSend

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§