pub trait Insertable<T>: Sized {
    fn insert(&mut self, t: T);
    fn return_content_and_clear(&mut self) -> Option<Self>;
}
Expand description

A generic component used for the container for the IntervalBuffer. This can be implemented for any type, and is only implemented for Vec by default.

For performance-specific implementations this should be replaced for whatever works for your situation.

Required methods

Insert an item in the buffer

Return the current content of the buffer, and clear itself.

If the container is empty, you can return None.

For Vec this is implemented as std::mem::replace(self, Vec::new())

Implementations on Foreign Types

Implementors