#[repr(C, packed(1))]pub struct VgaChar {
pub codepoint: u8,
pub attribute: u8,
}Expand description
An element of video buffer, contains codepoint and attribute.
Fields§
§codepoint: u8§attribute: u8Implementations§
source§impl VgaChar
impl VgaChar
sourcepub fn get_volatile(&self) -> Self
pub fn get_volatile(&self) -> Self
Get a VgaChar and suppress optimization. In case self is on video buffer.
let nonnull:NonNull::<VgaChar> = unsafe { NonNull::new_unchecked(VGA_PTR) };
let vchar = nonnull.as_ref().get_volatile();sourcepub fn set_volatile(&mut self, other: Self)
pub fn set_volatile(&mut self, other: Self)
Set a VgaChar and suppress optimization. In case self is on video buffer.
let mut nonnull:NonNull::<VgaChar> = unsafe { NonNull::new_unchecked(VGA_PTR) };
let vchar = nonnull.as_ref().get_volatile();
nonnull.as_mut().get_volatile(vchar & 0xff00);Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for VgaChar
impl Send for VgaChar
impl Sync for VgaChar
impl Unpin for VgaChar
impl UnwindSafe for VgaChar
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