#[repr(C)]pub struct FrameBuffer { /* private fields */ }
Expand description
A pixel-based framebuffer that controls the screen output.
Implementations§
Source§impl FrameBuffer
impl FrameBuffer
Sourcepub unsafe fn new(buffer_start: u64, info: FrameBufferInfo) -> Self
pub unsafe fn new(buffer_start: u64, info: FrameBufferInfo) -> Self
Creates a new framebuffer instance.
§Safety
The given start address and info must describe a valid, accessible, and unaliased framebuffer.
Sourcepub fn buffer_mut(&mut self) -> &mut [u8]
pub fn buffer_mut(&mut self) -> &mut [u8]
Returns the raw bytes of the framebuffer as mutable slice.
Sourcepub fn into_buffer(self) -> &'static mut [u8]
pub fn into_buffer(self) -> &'static mut [u8]
Converts the frame buffer to a raw byte slice.
The same as buffer_mut()
but takes the ownership and returns the
mutable buffer with a 'static
lifetime.
Sourcepub fn info(&self) -> FrameBufferInfo
pub fn info(&self) -> FrameBufferInfo
Returns layout and pixel format information of the framebuffer.
Trait Implementations§
Source§impl Clone for FrameBuffer
impl Clone for FrameBuffer
Source§fn clone(&self) -> FrameBuffer
fn clone(&self) -> FrameBuffer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FrameBuffer
impl Debug for FrameBuffer
impl Copy for FrameBuffer
Auto Trait Implementations§
impl Freeze for FrameBuffer
impl RefUnwindSafe for FrameBuffer
impl Send for FrameBuffer
impl Sync for FrameBuffer
impl Unpin for FrameBuffer
impl UnwindSafe for FrameBuffer
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