Skip to main content

TakedownGate

Trait TakedownGate 

Source
pub trait TakedownGate: MaybeSend + MaybeSync {
    // Required method
    fn check<'a>(
        &'a self,
        repo: &'a RepoId,
        leaf: &'a Hash,
    ) -> BoxFuture<'a, Result<TakedownVerdict, ServerError>>;

    // Provided method
    fn stops_descent(&self, _repo: &RepoId, _id: &Hash) -> bool { ... }
}
Expand description

§3 steps 7 and 8, filled by WP-5.9a: tombstones and blocks.

Required Methods§

Source

fn check<'a>( &'a self, repo: &'a RepoId, leaf: &'a Hash, ) -> BoxFuture<'a, Result<TakedownVerdict, ServerError>>

Decide for a leaf already proven a reachable member. A cached reachability proof skips the walk and its Self::stops_descent, so this must also refuse a chunk that only a blocked or tombstoned manifest reaches (§4).

Provided Methods§

Source

fn stops_descent(&self, _repo: &RepoId, _id: &Hash) -> bool

The reachability walk’s per-object stop predicate: never descend through a blocked or tombstoned manifest.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§