pub struct I16COSetBuilder { /* private fields */ }Expand description
Concurrent write-side builder for I16COSet.
Insertions are expected O(log n) through crossbeam_skiplist.
No merging is performed during insertion; normalization happens once
in seal.
Implementations§
Source§impl I16COSetBuilder
impl I16COSetBuilder
Sourcepub fn insert(&self, iv: I16CO)
pub fn insert(&self, iv: I16CO)
Inserts one interval into the builder.
This method is safe to call concurrently through shared references.
Identical intervals are deduplicated by the underlying SkipSet.
Sourcepub fn seal(self) -> I16COSet
pub fn seal(self) -> I16COSet
Consumes the builder and returns a canonical immutable set.
The merge process is linear over the sorted skip-list iterator:
- maintain one pending interval
cur; - if the next interval overlaps or is adjacent, replace
curwith its convex hull; - otherwise, push
curand start a new pending interval; - finally, push the last pending interval.
Trait Implementations§
Source§impl Debug for I16COSetBuilder
impl Debug for I16COSetBuilder
Source§impl Default for I16COSetBuilder
impl Default for I16COSetBuilder
Source§fn default() -> I16COSetBuilder
fn default() -> I16COSetBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for I16COSetBuilder
impl !RefUnwindSafe for I16COSetBuilder
impl Send for I16COSetBuilder
impl Sync for I16COSetBuilder
impl Unpin for I16COSetBuilder
impl UnsafeUnpin for I16COSetBuilder
impl !UnwindSafe for I16COSetBuilder
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