Skip to main content

Window

Trait Window 

pub trait Window<I> {
    // Required method
    fn window(
        &self,
        current: usize,
        size: NonZero<usize>,
    ) -> Result<Option<Vec<I>>, DatasetError>;
}
Expand description

Functionality to create a window.

Required Methods§

fn window( &self, current: usize, size: NonZero<usize>, ) -> Result<Option<Vec<I>>, DatasetError>

Creates a window of a collection.

§Returns

A Vec<I> representing the window, or None if the window doesn’t fit within the collection.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl<I, T> Window<I> for T
where T: Dataset<I> + ?Sized,