[−][src]Struct phreak_engine::datastructs::lifespanmap::LifespanMap
A Multiset of items T, each with it's own lifetime
Methods
impl<T, U> LifespanMap<T, U> where
T: Clone + Ord + Debug,
U: Copy + PartialOrd + Debug,
[src]
T: Clone + Ord + Debug,
U: Copy + PartialOrd + Debug,
pub fn new() -> Self
[src]
pub fn insert(&mut self, item: T, begin: U)
[src]
Insert an item without an end time
pub fn insert_with_end(&mut self, item: T, begin: U, end: U)
[src]
Insert an item with a given end time
pub fn set_end(&mut self, item: &T, end: U)
[src]
Set an end time on an item with open end
pub fn iter(&self) -> Iter<T, U>
[src]
pub fn iter_before(&self, before: U) -> IterBefore<T, U>
[src]
Creates an iterator that returns all items that exist just before the given timestamp, in unspecified order
pub fn iter_after(&self, before: U) -> IterAfter<T, U>
[src]
Creates an iterator that returns all items that exist just after the given timestamp, in unspecified order
pub fn iter_at(&self, at: U) -> IterAt<T, U>
[src]
Creates an iterator that returns all items that exist at the given timestamp, in unspecified order
pub fn cleanup(&mut self)
[src]
Find and removes all spans with an end date
pub fn is_empty(&self) -> bool
[src]
Trait Implementations
impl<T: Debug, U: Debug> Debug for LifespanMap<T, U> where
T: Clone + Ord + Debug,
U: Copy + PartialOrd + Debug,
[src]
T: Clone + Ord + Debug,
U: Copy + PartialOrd + Debug,
Auto Trait Implementations
impl<T, U> RefUnwindSafe for LifespanMap<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for LifespanMap<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for LifespanMap<T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
impl<T, U> Unpin for LifespanMap<T, U> where
T: Unpin,
U: Unpin,
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for LifespanMap<T, U> where
T: RefUnwindSafe + UnwindSafe,
U: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
U: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,