Trait Buffer

Source
pub trait Buffer {
    // Required methods
    fn size(&self) -> Size<i32, BufferCoords>;
    fn format(&self) -> Format;

    // Provided methods
    fn width(&self) -> u32 { ... }
    fn height(&self) -> u32 { ... }
}
Expand description

Common trait describing common properties of most types of buffers.

Required Methods§

Source

fn size(&self) -> Size<i32, BufferCoords>

Size of the two-dimensional buffer

Source

fn format(&self) -> Format

Pixel format of the buffer

Provided Methods§

Source

fn width(&self) -> u32

Width of the two-dimensional buffer

Source

fn height(&self) -> u32

Height of the two-dimensional buffer

Implementors§

Source§

impl Buffer for Dmabuf

Source§

impl Buffer for DumbBuffer

Available on crate feature backend_drm only.
Source§

impl Buffer for GbmBuffer

Available on crate feature backend_gbm only.
Source§

impl Buffer for VulkanImage

Available on crate feature backend_vulkan only.