pub struct RemoveBitmap(/* private fields */);Expand description
A canonical removal bitmap over the section-local indexes of one Indexed Authority Map section.
Implementations§
Source§impl RemoveBitmap
impl RemoveBitmap
Sourcepub fn from_indices(indices: &[u32]) -> Option<RemoveBitmap>
pub fn from_indices(indices: &[u32]) -> Option<RemoveBitmap>
Builds a canonical bitmap from a set of section-local indexes.
Returns None for an empty set: a no-op bitmap must be omitted.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<RemoveBitmap, RejectReason>
pub fn from_bytes(bytes: &[u8]) -> Result<RemoveBitmap, RejectReason>
Parses wire bytes, rejecting the non-canonical forms the profile forbids: an empty bitmap and trailing zero bytes.
Sourcepub fn validate_against(
&self,
entry_count: u32,
section: &'static str,
) -> Result<(), RejectReason>
pub fn validate_against( &self, entry_count: u32, section: &'static str, ) -> Result<(), RejectReason>
Validates that every set bit refers to an existing predecessor index
in a section with entry_count entries (indexes 0..entry_count).
Trait Implementations§
Source§impl Clone for RemoveBitmap
impl Clone for RemoveBitmap
Source§fn clone(&self) -> RemoveBitmap
fn clone(&self) -> RemoveBitmap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RemoveBitmap
impl Debug for RemoveBitmap
impl Eq for RemoveBitmap
Source§impl PartialEq for RemoveBitmap
impl PartialEq for RemoveBitmap
impl StructuralPartialEq for RemoveBitmap
Auto Trait Implementations§
impl Freeze for RemoveBitmap
impl RefUnwindSafe for RemoveBitmap
impl Send for RemoveBitmap
impl Sync for RemoveBitmap
impl Unpin for RemoveBitmap
impl UnsafeUnpin for RemoveBitmap
impl UnwindSafe for RemoveBitmap
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