#[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 mut vchar = nonnull.as_ref().get_volatile();
vchar.codepoint = 0u8;
nonnull.as_mut().get_volatile(vchar);Trait Implementations§
Auto Trait Implementations§
impl Freeze for VgaChar
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