Skip to main content

FillFn

Trait FillFn 

Source
pub trait FillFn<T> {
    // Required method
    fn call(&mut self, inited: usize, slices: (&mut [T], &mut [MaybeUninit<T>]));
}
Expand description

A callable trait for fill functions, usable as a trait object. This is a stable alternative to implementing FnMut manually.

Required Methods§

Source

fn call(&mut self, inited: usize, slices: (&mut [T], &mut [MaybeUninit<T>]))

Invoke the fill function with the given initialized count and memory slices.

Implementors§

Source§

impl<T, F> FillFn<T> for F
where F: FnMut(usize, (&mut [T], &mut [MaybeUninit<T>])),

Implements FillFn for any FnMut closure.