Skip to main content

Sampler

Trait Sampler 

Source
pub trait Sampler: Iterator<Item = usize> {
    // Required method
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Trait for sampling indices

Required Methods§

Source

fn len(&self) -> usize

Provided Methods§

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§