Skip to main content

Guard

Trait Guard 

Source
pub trait Guard {
    // Required method
    async fn verify(
        storage: &CoreBlockStorage,
        guard: String,
        state: Cid,
        heads: BTreeSet<Cid>,
        next_head: Cid,
    ) -> Result<bool, Error>;
}

Required Methods§

Source

async fn verify( storage: &CoreBlockStorage, guard: String, state: Cid, heads: BTreeSet<Cid>, next_head: Cid, ) -> Result<bool, Error>

Verify next_head is allowed to integrate into state@heads. Return true if is allowed to integrate, false if is not allowed to integrate. Errors will be treated as not allowed to integrate (false) but provide additional context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§