pub struct DeleteSet(/* private fields */);
Expand description
DeleteSet contains information about all blocks (described by clock ranges) that have been subjected to delete process.
Implementations§
source§impl DeleteSet
impl DeleteSet
sourcepub fn insert(&mut self, id: ID, len: u32)
pub fn insert(&mut self, id: ID, len: u32)
Inserts an information about delete block (identified by id
and having a specified length)
inside of a current delete set.
sourcepub fn is_deleted(&self, id: &ID) -> bool
pub fn is_deleted(&self, id: &ID) -> bool
Checks if given block id
is considered deleted from the perspective of current delete set.
sourcepub fn iter(&self) -> Iter<'_, ClientID, IdRange> ⓘ
pub fn iter(&self) -> Iter<'_, ClientID, IdRange> ⓘ
Returns an iterator over all client-range pairs registered in this delete set.
sourcepub fn merge(&mut self, other: Self)
pub fn merge(&mut self, other: Self)
Merges another delete set into a current one, combining their information about deleted clock ranges.
sourcepub fn squash(&mut self)
pub fn squash(&mut self)
Squashes the contents of a current delete set. This operation means, that in case when delete set contains any overlapping ranges within, they will be squashed together to optimize the space and make future encoding more compact.
pub fn range(&self, client_id: &ClientID) -> Option<&IdRange>
Trait Implementations§
source§impl PartialEq for DeleteSet
impl PartialEq for DeleteSet
impl Eq for DeleteSet
impl StructuralPartialEq for DeleteSet
Auto Trait Implementations§
impl Freeze for DeleteSet
impl RefUnwindSafe for DeleteSet
impl Send for DeleteSet
impl Sync for DeleteSet
impl Unpin for DeleteSet
impl UnwindSafe for DeleteSet
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