Skip to main content

MutableDataProvider

Trait MutableDataProvider 

Source
pub trait MutableDataProvider<T>: DataProvider<T> {
    // Required methods
    fn view_mut(&mut self) -> CoreResult<SharedArrayViewMut<'_, T>>;
    fn apply<F>(&mut self, f: F) -> CoreResult<()>
       where F: Fn(&mut T);
    fn clear(&mut self);
}
Expand description

Trait for components that can provide mutable data access

Required Methods§

Source

fn view_mut(&mut self) -> CoreResult<SharedArrayViewMut<'_, T>>

Get a mutable view of the data

Source

fn apply<F>(&mut self, f: F) -> CoreResult<()>
where F: Fn(&mut T),

Apply an operation to all elements

Source

fn clear(&mut self)

Clear all data

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§