[−][src]Struct uefi::proto::console::gop::FrameBuffer
Direct access to a memory-mapped frame buffer
Implementations
impl<'gop> FrameBuffer<'gop>
[src]
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]
Access the raw framebuffer pointer
To use this pointer safely and correctly, you must...
- Honor the pixel format and stride specified by the mode info
- Keep memory accesses in bound
- Use volatile reads and writes
- Make sure that the pointer does not outlive the FrameBuffer
pub fn size(&self) -> usize
[src]
Query the framebuffer size in bytes
pub unsafe fn write_byte(&mut self, index: usize, value: u8)
[src]
Modify the i-th byte of the frame buffer
Safety
This operation is unsafe because...
- You must honor the pixel format and stride specified by the mode info
- There is no bound checking on memory accesses in release mode
pub unsafe fn read_byte(&self, index: usize) -> u8
[src]
Read the i-th byte of the frame buffer
Safety
This operation is unsafe because...
- You must honor the pixel format and stride specified by the mode info
- There is no bound checking on memory accesses in release mode
pub unsafe fn write_value<T>(&mut self, index: usize, value: T)
[src]
Write a value in the frame buffer, starting at the i-th byte
We only recommend using this method with [u8; N] arrays. Once Rust has const generics, it will be deprecated and replaced with a write_bytes() method that only accepts [u8; N] input.
Safety
This operation is unsafe because...
- It is your reponsibility to make sure that the value type makes sense
- You must honor the pixel format and stride specified by the mode info
- There is no bound checking on memory accesses in release mode
pub unsafe fn read_value<T>(&self, index: usize) -> T
[src]
Read a value from the frame buffer, starting at the i-th byte
We only recommend using this method with [u8; N] arrays. Once Rust has const generics, it will be deprecated and replaced with a read_bytes() method that only accepts [u8; N] input.
Safety
This operation is unsafe because...
- It is your reponsibility to make sure that the value type makes sense
- You must honor the pixel format and stride specified by the mode info
- There is no bound checking on memory accesses in release mode
Auto Trait Implementations
impl<'gop> !Send for FrameBuffer<'gop>
impl<'gop> !Sync for FrameBuffer<'gop>
impl<'gop> Unpin for FrameBuffer<'gop>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,