hardware 0.0.9

A no_std bare-metal hardware abstraction layer — all port I/O, memory and swap allocations are guarded at runtime. Do not consider this dependency stable before x.1.x
Documentation
pub struct Texture {
    pub width: usize,
    pub height: usize,
    pub format: u32,
}

impl Texture {
    pub fn new(width: usize, height: usize, format: u32) -> Self {
        Texture {
            width,
            height,
            format,
        }
    }

    pub fn size_bytes(&self) -> usize {
        self.width * self.height * 4
    }
}