pub struct Screen<'terminal> { /* private fields */ }
Expand description
A locked screen terminal with exclusive access to it. With this struct, a locked screen handle, one can execute many operations without locking and unlocking.
Implementations§
source§impl<'terminal> Screen<'terminal>
impl<'terminal> Screen<'terminal>
sourcepub fn valid_size(&self) -> bool
pub fn valid_size(&self) -> bool
Returns whether the stored size is the actual size and the actual size is valid.
sourcepub fn get(&self, point: Vec2) -> &Tile
pub fn get(&self, point: Vec2) -> &Tile
Gets the attributes of a given Tile
, regardless of being flushed to
the screen yet or not.
sourcepub fn clear(&mut self, background: Color)
pub fn clear(&mut self, background: Color)
Sets every Tile
into a whitespace grapheme with the given color.
sourcepub fn styled_text<C>(&mut self, tstring: &TermString, style: Style<C>) -> Coordwhere
C: Updater,
pub fn styled_text<C>(&mut self, tstring: &TermString, style: Style<C>) -> Coordwhere C: Updater,
Prints a grapheme-encoded text (a TermString
) using some style
options like ratio to the screen, color, margin and others. See
Style
.
Trait Implementations§
Auto Trait Implementations§
impl<'terminal> !RefUnwindSafe for Screen<'terminal>
impl<'terminal> Send for Screen<'terminal>
impl<'terminal> Sync for Screen<'terminal>
impl<'terminal> Unpin for Screen<'terminal>
impl<'terminal> !UnwindSafe for Screen<'terminal>
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.