pub trait SampleAccess {
// Required methods
fn read(
&self,
channel: usize,
row: usize,
column: usize,
bit_depth: i32,
) -> u16;
fn write(
&mut self,
plane: usize,
row: usize,
column: usize,
value: u16,
bit_depth: i32,
);
}Expand description
Sample access supplied by the caller. The C adapter owns its raw-pointer safety contract; the WebP adapter checks all access through Rust slices.
Required Methods§
fn read(&self, channel: usize, row: usize, column: usize, bit_depth: i32) -> u16
fn write( &mut self, plane: usize, row: usize, column: usize, value: u16, bit_depth: i32, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".