pub struct FrameDamage {
full: bool,
lines: Vec<LineDamageBounds>,
rects: Vec<Rect>,
}
Expand description
Damage state for the rendering frame.
Fields§
§full: bool
The entire frame needs to be redrawn.
lines: Vec<LineDamageBounds>
Terminal lines damaged in the given frame.
rects: Vec<Rect>
Rectangular regions damage in the given frame.
Implementations§
Source§impl FrameDamage
impl FrameDamage
Sourcepub fn damage_line(&mut self, damage: LineDamageBounds)
pub fn damage_line(&mut self, damage: LineDamageBounds)
Damage line for the given frame.
pub fn damage_point(&mut self, point: Point<usize>)
Sourcepub fn mark_fully_damaged(&mut self)
pub fn mark_fully_damaged(&mut self)
Mark the frame as fully damaged.
Sourcepub fn add_viewport_rect(
&mut self,
size_info: &SizeInfo,
x: i32,
y: i32,
width: i32,
height: i32,
)
pub fn add_viewport_rect( &mut self, size_info: &SizeInfo, x: i32, y: i32, width: i32, height: i32, )
Add viewport rectangle to damage.
This allows covering elements outside of the terminal viewport, like message bar.
fn reset(&mut self, num_lines: usize, num_cols: usize)
Trait Implementations§
Source§impl Debug for FrameDamage
impl Debug for FrameDamage
Source§impl Default for FrameDamage
impl Default for FrameDamage
Source§fn default() -> FrameDamage
fn default() -> FrameDamage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrameDamage
impl RefUnwindSafe for FrameDamage
impl Send for FrameDamage
impl Sync for FrameDamage
impl Unpin for FrameDamage
impl UnwindSafe for FrameDamage
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>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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.