Struct identity_iota::did::RevocationBitmap
source · [−]pub struct RevocationBitmap(_);
Expand description
A compressed bitmap for managing credential revocation.
Implementations
sourceimpl RevocationBitmap
impl RevocationBitmap
sourcepub fn new() -> RevocationBitmap
pub fn new() -> RevocationBitmap
Constructs a new empty RevocationBitmap
.
sourcepub fn is_revoked(&self, index: u32) -> bool
pub fn is_revoked(&self, index: u32) -> bool
Returns true
if the credential at the given index
is revoked.
sourcepub fn revoke(&mut self, index: u32) -> bool
pub fn revoke(&mut self, index: u32) -> bool
Mark the given index
as revoked.
Returns true if the index
was absent from the set.
sourcepub fn unrevoke(&mut self, index: u32) -> bool
pub fn unrevoke(&mut self, index: u32) -> bool
Mark the index
as not revoked.
Returns true if the index
was present in the set.
sourcepub fn to_endpoint(&self) -> Result<ServiceEndpoint, Error>
pub fn to_endpoint(&self) -> Result<ServiceEndpoint, Error>
Return the bitmap as a data url embedded in a service endpoint.
sourcepub fn from_endpoint(
service_endpoint: &ServiceEndpoint
) -> Result<RevocationBitmap, Error>
pub fn from_endpoint(
service_endpoint: &ServiceEndpoint
) -> Result<RevocationBitmap, Error>
Construct a RevocationBitmap
from a data url embedded in service_endpoint
.
Trait Implementations
sourceimpl Clone for RevocationBitmap
impl Clone for RevocationBitmap
sourcefn clone(&self) -> RevocationBitmap
fn clone(&self) -> RevocationBitmap
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RevocationBitmap
impl Debug for RevocationBitmap
sourceimpl Default for RevocationBitmap
impl Default for RevocationBitmap
sourcefn default() -> RevocationBitmap
fn default() -> RevocationBitmap
Returns the “default value” for a type. Read more
sourceimpl PartialEq<RevocationBitmap> for RevocationBitmap
impl PartialEq<RevocationBitmap> for RevocationBitmap
sourcefn eq(&self, other: &RevocationBitmap) -> bool
fn eq(&self, other: &RevocationBitmap) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RevocationBitmap) -> bool
fn ne(&self, other: &RevocationBitmap) -> bool
This method tests for !=
.
sourceimpl<'_, D> TryFrom<&Service<D, BTreeMap<String, Value, Global>>> for RevocationBitmap where
D: DID,
impl<'_, D> TryFrom<&Service<D, BTreeMap<String, Value, Global>>> for RevocationBitmap where
D: DID,
impl StructuralPartialEq for RevocationBitmap
Auto Trait Implementations
impl RefUnwindSafe for RevocationBitmap
impl Send for RevocationBitmap
impl Sync for RevocationBitmap
impl Unpin for RevocationBitmap
impl UnwindSafe for RevocationBitmap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more