pub trait VirtualVector<T> {
// Required methods
fn total_len(&self) -> usize;
fn slice(&mut self, range: Range<usize>) -> impl Iterator<Item = T>;
// Provided methods
fn is_empty(&self) -> bool { ... }
fn enumerate(self) -> Enumerate<Self, T>
where Self: Sized { ... }
}Expand description
A trait that can be implemented on a type so that the type can be used in a virtual_stack or virtual_list.
Required Methods§
fn total_len(&self) -> usize
fn slice(&mut self, range: Range<usize>) -> impl Iterator<Item = T>
Provided Methods§
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.