[][src]Struct crev_lib::proofdb::ProofDB

pub struct ProofDB { /* fields omitted */ }

In memory database tracking information from proofs

After population, used for calculating the effcttive trust set, etc.

Right now, for every invocation of crev, we just load it up with all known proofs, and then query. If it ever becomes too slow, all the logic here will have to be moved to a real embedded db of some kind.

Methods

impl ProofDB
[src]

pub fn new() -> Self
[src]

pub fn unique_package_review_proof_count(&self) -> usize
[src]

pub fn unique_trust_proof_count(&self) -> usize
[src]

pub fn get_package_review_count(
    &self,
    source: &str,
    name: Option<&str>,
    version: Option<&str>
) -> usize
[src]

pub fn get_package_reviews_for_package(
    &self,
    source: &str,
    name: Option<&str>,
    version: Option<&str>
) -> impl Iterator<Item = Package>
[src]

pub fn all_known_ids(&self) -> BTreeSet<Id>
[src]

pub fn all_author_ids(&self) -> BTreeMap<Id, usize>
[src]

Get all Ids that authored a proof (with total count)

pub fn get_package_reviews_by_digest<'a>(
    &'a self,
    digest: &Digest
) -> impl Iterator<Item = Package> + 'a
[src]

pub fn verify_package_digest(
    &self,
    digest: &Digest,
    trust_set: &TrustSet
) -> VerificationStatus
[src]

pub fn import_from_iter(
    &mut self,
    i: impl Iterator<Item = Proof>
)
[src]

pub fn calculate_trust_set(
    &self,
    for_id: &Id,
    params: &TrustDistanceParams
) -> TrustSet
[src]

pub fn lookup_url(&self, id: &Id) -> Option<&Url>
[src]

Trait Implementations

impl Default for ProofDB
[src]

Auto Trait Implementations

impl Send for ProofDB

impl Sync for ProofDB

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default