Skip to main content

WrapMode

Trait WrapMode 

Source
pub trait WrapMode {
    // Required methods
    fn new(size: u32) -> Self;
    fn func(&mut self, v: i32) -> u32;
    fn inc(&mut self) -> u32;
}
Expand description

Coordinate wrapping mode for tiled image access.

Required Methods§

Source

fn new(size: u32) -> Self

Create a wrap mode for the given image dimension.

Source

fn func(&mut self, v: i32) -> u32

Map a coordinate to wrapped output, storing internal state.

Source

fn inc(&mut self) -> u32

Increment the internal state, returning the next wrapped coordinate.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§