Skip to main content

CommitSource

Trait CommitSource 

Source
pub trait CommitSource {
    // Required methods
    fn chain(&self) -> Chain;
    fn fetch(
        &self,
        txid: Txid,
        cancelled: &AtomicBool,
    ) -> Result<Option<Vec<u8>>, Error>;

    // Provided method
    fn probe(&self) -> Option<Result<(), Error>> { ... }
}
Expand description

Untrusted auxiliary parent bytes, not a chain verifier. The chain getter reads local configuration without I/O. Each fetch must bound its own I/O; Engine cancellation is cooperative and cannot interrupt a running fetch.

Required Methods§

Source

fn chain(&self) -> Chain

Source

fn fetch( &self, txid: Txid, cancelled: &AtomicBool, ) -> Result<Option<Vec<u8>>, Error>

Provided Methods§

Source

fn probe(&self) -> Option<Result<(), Error>>

A liveness check for status, rate-limited by the source itself. None when no fresh check ran (or the source has none); otherwise its result.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§