binstalk_downloader::download

Trait DataVerifier

Source
pub trait DataVerifier: Send + Sync {
    // Required methods
    fn update(&mut self, data: &Bytes);
    fn validate(&mut self) -> bool;
}

Required Methods§

Source

fn update(&mut self, data: &Bytes)

Digest input data.

This method can be called repeatedly for use with streaming messages, it will be called in the order of the message received.

Source

fn validate(&mut self) -> bool

Finalise the data verification.

Return false if the data is invalid.

Implementations on Foreign Types§

Source§

impl DataVerifier for ()

Source§

fn update(&mut self, _: &Bytes)

Source§

fn validate(&mut self) -> bool

Implementors§