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 RefPoint
s.
Required Associated Types§
Required Methods§
Sourcefn slice(&self, range: impl RangeBounds<Self::RefPoint>) -> Option<&Self::Slice>
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 ofget_oldest_point()
. - If the end bound is
Unbounded
, behaviour must be that the slice contains at least up to the element corresponding last-mostRefPoint
obtainable from theBacktrackingIterator
- 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.