Skip to main content

Canvas

Trait Canvas 

Source
pub trait Canvas {
    // Required method
    unsafe fn as_bytes(&self) -> &[u8];
}
Expand description

Canvas is an Image that can be drawn upon.

Required Methods§

Source

unsafe fn as_bytes(&self) -> &[u8]

Get the raw canvas representation.

§Safety

Don’t use it. The internal canvas representation might change in the future and so should not be relied upon.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Canvas for CanvasBuf

Available on crate feature alloc only.
Source§

impl Canvas for CanvasRef<'_>