pub struct GbStream { /* private fields */ }Expand description
Byte print stream of GameBoy.
Currently, GbStream prints bytes one by one using GBDK’s putchar function.
In the long run, it is likely to change to RustGB own implementation.
Optionally, GbStream can have font and color.
§Examples
use core::fmt::Write;
let mut w = GbStream::new();
write!(w, "Hello, World!");Implementations§
Source§impl GbStream
impl GbStream
Sourcepub fn write_byte(&mut self, b: u8) -> Result<(), Error>
pub fn write_byte(&mut self, b: u8) -> Result<(), Error>
Writes a byte into this writer, returning whether the write succeeded.
write_char assumes that the input is valid Unicode character. However, GBDK maps one byte to one character or symbol.
Therefore, write_byte is recommended when you want to print one
character to the GameBoy.
§Errors
This function will return an instance of Error on error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GbStream
impl RefUnwindSafe for GbStream
impl Send for GbStream
impl Sync for GbStream
impl Unpin for GbStream
impl UnwindSafe for GbStream
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