Trait sequoia_wot::store::Store

source ·
pub trait Store {
    fn reference_time(&self) -> SystemTime;
    fn list<'a>(&'a self) -> Box<dyn Iterator<Item = Fingerprint> + 'a>;
    fn cert(&self, kh: &KeyHandle) -> Result<Vec<CertSynopsis>>;
    fn certifications_of(
        &self,
        target: &Fingerprint,
        min_depth: Depth
    ) -> Result<Vec<CertificationSet>>; fn certs<'a>(&'a self) -> Box<dyn Iterator<Item = CertSynopsis> + 'a> { ... } fn cert_by_fpr(&self, fingerprint: &Fingerprint) -> Result<CertSynopsis> { ... } fn third_party_certifications_of(
        &self,
        fpr: &Fingerprint
    ) -> Vec<Certification> { ... } fn certified_userids_of(&self, fpr: &Fingerprint) -> Vec<UserID> { ... } fn certified_userids(&self) -> Vec<(Fingerprint, UserID)> { ... } fn with_userid(&self, userid: UserID) -> Vec<Fingerprint> { ... } fn with_email(&self, email: &str) -> Vec<(Fingerprint, UserID)> { ... } }

Required Methods§

Returns the reference time.

Lists all of the certificates.

Returns the certificates matching the handle.

Returns StoreError::NotFound if the certificate is not found. This function SHOULD NOT return an empty vector if the certificate is not found.

The caller may assume that looking up a fingerprint returns at most one certificate.

Returns a certification set for the specified certificate.

A CertificateSet is returned for the certificate itself as well as for each User ID (self signed or not) that has a cryptographically valid certification.

Returns StoreError::NotFound if the certificate is not found. This function SHOULD NOT return an empty vector if the certificate is not found.

An implementation may (but need not) use the min_depth parameter to filter the the certifications it returns. The min_depth parameter says that the caller is only interested in certifications for which the trust depth is at least min_depth. If an implementation returns certifications whose trust depth is less than min_depth the caller must ignore them.

Provided Methods§

Returns all of the certificates.

Returns the corresponding certificate, if any.

Returns StoreError::NotFound if the certificate is not found. This function SHOULD NOT return an empty vector if the certificate is not found.

Returns all third-party certifications of the specified certificate.

Returns StoreError::NotFound if the certificate is not found. This function SHOULD NOT return an empty vector if the certificate is not found.

Returns all User IDs that were certified for the specified certificate.

This returns both self-signed User IDs, and User IDs certified by third-parties for the specified certificate. The result is deduped.

Returns StoreError::NotFound if the certificate is not found. This function SHOULD NOT return an empty vector if the certificate is not found.

Returns all User IDs that were certified.

This returns both self-signed User IDs, and User IDs certified by third-parties. The result is deduped.

Returns all certificates that may have the specified User ID.

This returns both self-signed User IDs, and User IDs certified by third-parties. It is okay for this function to return false positives, i.e., certificates that on closer inspection shouldn’t be associated with that User ID.

Returns all certificates that may have a User ID with the specified email address.

This returns both self-signed User IDs, and User IDs certified by third-parties. It is okay for this function to return false positives, i.e., certificates that on closer inspection shouldn’t be associated with that User ID.

Implementations on Foreign Types§

Returns the reference time.

Lists all of the certificates.

Returns all of the certificates.

Implementors§