pub struct SelfTimeTree<T> {
entries: Vec<SelfTimeEntry<T>>,
children: Option<Box<SelfTimeChildren<T>>>,
count: usize,
}
Fields§
§entries: Vec<SelfTimeEntry<T>>
§children: Option<Box<SelfTimeChildren<T>>>
§count: usize
Implementations§
Source§impl<T> SelfTimeTree<T>
impl<T> SelfTimeTree<T>
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn insert(&mut self, start: Timestamp, end: Timestamp, item: T)
fn check_for_split(&mut self)
fn split(&mut self)
fn distribute_entries(&mut self)
fn rebalance(&mut self)
pub fn lookup_range_corrected_time( &self, start: Timestamp, end: Timestamp, ) -> Timestamp
pub fn for_each_in_range( &self, start: Timestamp, end: Timestamp, f: impl FnMut(Timestamp, Timestamp, &T), )
fn for_each_in_range_ref( &self, start: Timestamp, end: Timestamp, f: &mut impl FnMut(Timestamp, Timestamp, &T), )
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SelfTimeTree<T>
impl<T> RefUnwindSafe for SelfTimeTree<T>where
T: RefUnwindSafe,
impl<T> Send for SelfTimeTree<T>where
T: Send,
impl<T> Sync for SelfTimeTree<T>where
T: Sync,
impl<T> Unpin for SelfTimeTree<T>where
T: Unpin,
impl<T> UnwindSafe for SelfTimeTree<T>where
T: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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