pub struct SnapshotIdSet { /* private fields */ }Implementations§
Source§impl SnapshotIdSet
impl SnapshotIdSet
Sourcepub const EMPTY: SnapshotIdSet
pub const EMPTY: SnapshotIdSet
Empty snapshot ID set.
Sourcepub fn get(&self, id: SnapshotId) -> bool
pub fn get(&self, id: SnapshotId) -> bool
Check if a snapshot ID is in the set.
Sourcepub fn set(&self, id: SnapshotId) -> Self
pub fn set(&self, id: SnapshotId) -> Self
Add a snapshot ID to the set (returns a new set if modified).
Sourcepub fn clear(&self, id: SnapshotId) -> Self
pub fn clear(&self, id: SnapshotId) -> Self
Remove a snapshot ID from the set (returns a new set if modified).
Sourcepub fn lowest(&self, upper: SnapshotId) -> SnapshotId
pub fn lowest(&self, upper: SnapshotId) -> SnapshotId
Find the lowest snapshot ID in the set that is <= upper.
Sourcepub fn iter(&self) -> SnapshotIdSetIter<'_> ⓘ
pub fn iter(&self) -> SnapshotIdSetIter<'_> ⓘ
Iterate over all snapshot IDs in the set.
Sourcepub fn to_list(&self) -> Vec<SnapshotId> ⓘ
pub fn to_list(&self) -> Vec<SnapshotId> ⓘ
Convert to a Vec of snapshot IDs (for testing/debugging).
Sourcepub fn add_range(&self, from: SnapshotId, until: SnapshotId) -> Self
pub fn add_range(&self, from: SnapshotId, until: SnapshotId) -> Self
Add a contiguous range of IDs [from, until) to the set. Mirrors AndroidX SnapshotIdSet.addRange semantics used by Snapshot.kt.
Trait Implementations§
Source§impl Clone for SnapshotIdSet
impl Clone for SnapshotIdSet
Source§fn clone(&self) -> SnapshotIdSet
fn clone(&self) -> SnapshotIdSet
Returns a duplicate of the value. Read more
1.0.0 · 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 SnapshotIdSet
impl Debug for SnapshotIdSet
Source§impl Default for SnapshotIdSet
impl Default for SnapshotIdSet
Source§impl PartialEq for SnapshotIdSet
impl PartialEq for SnapshotIdSet
impl Eq for SnapshotIdSet
impl StructuralPartialEq for SnapshotIdSet
Auto Trait Implementations§
impl Freeze for SnapshotIdSet
impl RefUnwindSafe for SnapshotIdSet
impl Send for SnapshotIdSet
impl Sync for SnapshotIdSet
impl Unpin for SnapshotIdSet
impl UnwindSafe for SnapshotIdSet
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