Trait SliceableIterator

Source
pub trait SliceableIterator: BacktrackingIterator {
    type Slice: ?Sized;

    // Required method
    fn slice(
        &self,
        range: impl RangeBounds<Self::RefPoint>,
    ) -> Option<&Self::Slice>;
}
Expand description

A backtracking iterator which represents history in a way that makes it possible to produce slices over ranges of RefPoints.

Required Associated Types§

Required Methods§

Source

fn slice(&self, range: impl RangeBounds<Self::RefPoint>) -> Option<&Self::Slice>

Produce a slice corresponding to the given range.

  • If the starting bound is Unbounded, behaviour must be equivalent to if it were set to the value of get_oldest_point().
  • If the end bound is Unbounded, behaviour must be that the slice contains at least up to the element corresponding last-most RefPoint obtainable from the BacktrackingIterator - the slice may or may not contain more elements.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§