pub unsafe trait ImageData: Copy + Default {
type STORAGE: Copy;
const TYPE: ImageType;
// Required methods
fn getter( ) -> unsafe extern "C" fn(MImage, *mut mint, mint, *mut Self) -> c_int;
fn setter() -> unsafe extern "C" fn(MImage, *mut mint, mint, Self) -> c_int;
}Expand description
Trait implemented for types that can logically be stored in an Image.
The STORAGE associated type represents the data that is physically stored in the
Image buffer.
The following logical types can be used in an image:
§Safety
This trait is already implemented for all types that can legally be stored in an
Image. Implementing this trait for other types may lead to undefined behavior.
Required Associated Constants§
Required Associated Types§
Sourcetype STORAGE: Copy
type STORAGE: Copy
The type of the data that is physically stored in the Image buffer.
In practice, this type is equal to Self for every logicaly type except bool,
which represents a bitmapped image that logically stores a single bit of boolean
data, but physically allocate one byte for each pixel/channel.
Required Methods§
fn getter() -> unsafe extern "C" fn(MImage, *mut mint, mint, *mut Self) -> c_int
fn setter() -> unsafe extern "C" fn(MImage, *mut mint, mint, Self) -> c_int
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".