pub struct ModuleGrid { /* private fields */ }Expand description
Owned mutable module grid used by plugin postprocessors.
Implementations§
Source§impl ModuleGrid
impl ModuleGrid
Sourcepub fn new(
modules: Vec<Color>,
width: usize,
height: usize,
) -> Result<Self, PluginError>
pub fn new( modules: Vec<Color>, width: usize, height: usize, ) -> Result<Self, PluginError>
Creates a module grid from row-major modules.
§Errors
Returns PluginError::InvalidModuleGrid when the dimensions are zero
or modules.len() != width * height.
Sourcepub fn modules_mut(&mut self) -> &mut [Color]
pub fn modules_mut(&mut self) -> &mut [Color]
Returns the grid modules as a mutable row-major slice.
Trait Implementations§
Source§impl Clone for ModuleGrid
impl Clone for ModuleGrid
Source§fn clone(&self) -> ModuleGrid
fn clone(&self) -> ModuleGrid
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleGrid
impl Debug for ModuleGrid
impl Eq for ModuleGrid
Source§impl ModuleStorage for ModuleGrid
impl ModuleStorage for ModuleGrid
Source§impl PartialEq for ModuleGrid
impl PartialEq for ModuleGrid
impl StructuralPartialEq for ModuleGrid
Auto Trait Implementations§
impl Freeze for ModuleGrid
impl RefUnwindSafe for ModuleGrid
impl Send for ModuleGrid
impl Sync for ModuleGrid
impl Unpin for ModuleGrid
impl UnsafeUnpin for ModuleGrid
impl UnwindSafe for ModuleGrid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more