identity_iota::credential

Trait RevocationDocumentExt

Source
pub trait RevocationDocumentExt: Sealed {
    // Required methods
    fn revoke_credentials<'query, 'me, Q>(
        &'me mut self,
        service_query: Q,
        indices: &[u32],
    ) -> Result<(), RevocationError>
       where Q: Into<DIDUrlQuery<'query>>;
    fn unrevoke_credentials<'query, 'me, Q>(
        &'me mut self,
        service_query: Q,
        indices: &[u32],
    ) -> Result<(), RevocationError>
       where Q: Into<DIDUrlQuery<'query>>;
    fn resolve_revocation_bitmap(
        &self,
        query: DIDUrlQuery<'_>,
    ) -> Result<RevocationBitmap, RevocationError>;
}
Expand description

Extension trait providing convenience methods to update a RevocationBitmap2022 service in a CoreDocument.

Required Methods§

Source

fn revoke_credentials<'query, 'me, Q>( &'me mut self, service_query: Q, indices: &[u32], ) -> Result<(), RevocationError>
where Q: Into<DIDUrlQuery<'query>>,

If the document has a RevocationBitmap service identified by service_query, revoke all specified indices.

Source

fn unrevoke_credentials<'query, 'me, Q>( &'me mut self, service_query: Q, indices: &[u32], ) -> Result<(), RevocationError>
where Q: Into<DIDUrlQuery<'query>>,

If the document has a RevocationBitmap service identified by service_query, unrevoke all specified indices.

Source

fn resolve_revocation_bitmap( &self, query: DIDUrlQuery<'_>, ) -> Result<RevocationBitmap, RevocationError>

Extracts the RevocationBitmap from the referenced service in the DID Document.

§Errors

Fails if the referenced service is not found, or is not a valid RevocationBitmap2022 service.

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§