pub trait Slicable<'a, L: Location<'a>> {
type Slice;
type Backtrace;
// Required methods
fn preferred_tick(&self) -> Option<Tick<L>>;
fn get_location(&self) -> &L;
fn slice(self, tick: &Tick<L>, backtrace: Self::Backtrace) -> Self::Slice;
// Provided method
fn create_tick(&self) -> Tick<L>
where L: NoTick { ... }
}Expand description
A trait for live collections which can be sliced into bounded versions at a tick.
Required Associated Types§
Required Methods§
Sourcefn preferred_tick(&self) -> Option<Tick<L>>
fn preferred_tick(&self) -> Option<Tick<L>>
Gets the preferred tick to slice at. Used for atomic slicing.
Sourcefn get_location(&self) -> &L
fn get_location(&self) -> &L
Gets the location associated with this live collection.
Provided Methods§
Sourcefn create_tick(&self) -> Tick<L>where
L: NoTick,
fn create_tick(&self) -> Tick<L>where
L: NoTick,
Creates a tick that is appropriate for the collection’s location.