pub struct CanvasCell { /* private fields */ }Expand description
Complete content of one Canvas cell.
Implementations§
Source§impl CanvasCell
impl CanvasCell
Sourcepub fn new(symbol: &Grapheme, style: TextStyle) -> Self
pub fn new(symbol: &Grapheme, style: TextStyle) -> Self
Creates complete cell content.
The symbol is validated at this boundary even in release builds.
pub fn get_symbol(&self) -> &str
pub const fn get_style(&self) -> &TextStyle
Sourcepub fn symbol(self, symbol: &Grapheme) -> Self
pub fn symbol(self, symbol: &Grapheme) -> Self
Replaces the symbol, validating it even in release builds.
pub fn style(self, style: TextStyle) -> Self
Trait Implementations§
Source§impl Clone for CanvasCell
impl Clone for CanvasCell
Source§fn clone(&self) -> CanvasCell
fn clone(&self) -> CanvasCell
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CanvasCell
impl Debug for CanvasCell
Source§impl PartialEq for CanvasCell
impl PartialEq for CanvasCell
Source§fn eq(&self, other: &CanvasCell) -> bool
fn eq(&self, other: &CanvasCell) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CanvasCell
impl StructuralPartialEq for CanvasCell
Auto Trait Implementations§
impl Freeze for CanvasCell
impl RefUnwindSafe for CanvasCell
impl Send for CanvasCell
impl Sync for CanvasCell
impl Unpin for CanvasCell
impl UnsafeUnpin for CanvasCell
impl UnwindSafe for CanvasCell
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