pub struct Frame {
pub count: u32,
pub is_odd: bool,
pub buffer: Buffer,
}Expand description
PPU frame.
Fields§
§count: u32§is_odd: bool§buffer: BufferImplementations§
Source§impl Frame
impl Frame
pub fn new() -> Self
pub const fn increment(&mut self)
pub fn pixel(&self, x: u32, y: u32) -> u16
pub fn set_pixel(&mut self, x: u32, y: u32, color: u16)
pub fn pixel_brightness(&self, x: u32, y: u32) -> u32
pub const fn number(&self) -> u32
pub const fn is_odd(&self) -> bool
pub fn buffer(&self) -> &[u16]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Frame
impl<'de> Deserialize<'de> for Frame
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more