pub struct Signers { /* private fields */ }Expand description
Bitmap wrapper that tracks which participants signed a certificate.
Internally, it stores bits in 1-byte chunks for compact encoding.
Implementations§
Source§impl Signers
impl Signers
Sourcepub fn from(
participants: usize,
signers: impl IntoIterator<Item = Participant>,
) -> Self
pub fn from( participants: usize, signers: impl IntoIterator<Item = Participant>, ) -> Self
Sourcepub const fn len(&self) -> usize
pub const fn len(&self) -> usize
Returns the length of the bitmap (the size of the participant set).
Sourcepub fn iter(&self) -> impl Iterator<Item = Participant> + '_
pub fn iter(&self) -> impl Iterator<Item = Participant> + '_
Iterates over signer indices in ascending order.
Trait Implementations§
Source§impl EncodeSize for Signers
impl EncodeSize for Signers
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl Read for Signers
impl Read for Signers
impl Eq for Signers
impl StructuralPartialEq for Signers
Auto Trait Implementations§
impl Freeze for Signers
impl RefUnwindSafe for Signers
impl Send for Signers
impl Sync for Signers
impl Unpin for Signers
impl UnwindSafe for Signers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more