#[repr(C)]pub struct Output<'boot> { /* private fields */ }
Expand description
Interface for text-based output devices.
It implements the fmt::Write trait, so you can use it to print text with
standard Rust constructs like the write!()
and writeln!()
macros.
Implementations
sourceimpl<'boot> Output<'boot>
impl<'boot> Output<'boot>
sourcepub fn reset(&mut self, extended: bool) -> Result
pub fn reset(&mut self, extended: bool) -> Result
Resets and clears the text output device hardware.
sourcepub fn clear(&mut self) -> Result
pub fn clear(&mut self) -> Result
Clears the output screen.
The background is set to the current background color. The cursor is moved to (0, 0).
sourcepub fn output_string(&mut self, string: &CStr16) -> Result
pub fn output_string(&mut self, string: &CStr16) -> Result
Writes a string to the output device.
sourcepub fn output_string_lossy(&mut self, string: &CStr16) -> Result
pub fn output_string_lossy(&mut self, string: &CStr16) -> Result
Writes a string to the output device. If the string contains unknown characters that cannot be rendered they will be silently skipped.
sourcepub fn test_string(&mut self, string: &CStr16) -> Result<bool>
pub fn test_string(&mut self, string: &CStr16) -> Result<bool>
Checks if a string contains only supported characters.
UEFI applications are encouraged to try to print a string even if it contains some unsupported characters.
sourcepub fn modes<'out>(&'out mut self) -> OutputModeIter<'out, 'boot>
pub fn modes<'out>(&'out mut self) -> OutputModeIter<'out, 'boot>
Returns an iterator of all supported text modes.
sourcepub fn current_mode(&self) -> Result<Option<OutputMode>>
pub fn current_mode(&self) -> Result<Option<OutputMode>>
Returns the the current text mode.
sourcepub fn set_mode(&mut self, mode: OutputMode) -> Result
pub fn set_mode(&mut self, mode: OutputMode) -> Result
Sets a mode as current.
sourcepub fn cursor_visible(&self) -> bool
pub fn cursor_visible(&self) -> bool
Returns whether the cursor is currently shown or not.
sourcepub fn enable_cursor(&mut self, visible: bool) -> Result
pub fn enable_cursor(&mut self, visible: bool) -> Result
Make the cursor visible or invisible.
The output device may not support this operation, in which case an
Unsupported
error will be returned.
sourcepub fn set_cursor_position(&mut self, column: usize, row: usize) -> Result
pub fn set_cursor_position(&mut self, column: usize, row: usize) -> Result
Sets the cursor’s position, relative to the top-left corner, which is (0, 0).
This function will fail if the cursor’s new position would exceed the screen’s bounds.
Trait Implementations
sourceimpl<'boot> Write for Output<'boot>
impl<'boot> Write for Output<'boot>
impl<'boot> Protocol for Output<'boot>
impl<'boot> !Send for Output<'boot>
impl<'boot> !Sync for Output<'boot>
Auto Trait Implementations
impl<'boot> RefUnwindSafe for Output<'boot>
impl<'boot> Unpin for Output<'boot>
impl<'boot> UnwindSafe for Output<'boot>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more