pub struct Cell { /* private fields */ }Expand description
A Cell corresponds to a single grapheme cluster on some Plane,
A Cell is bounded to n Plane, but the cell doesn’t store anything
about the plane.
At any NcCell, we can have a theoretically arbitrarily long UTF-8 string,
a foreground color, a background color, and a Style attribute set.
Implementations§
Source§impl Cell
§egc
impl Cell
§egc
Sourcepub const fn uses_egcpool(&self) -> bool
pub const fn uses_egcpool(&self) -> bool
Returns true if the egc is stored in the associated plane’s egc pool,
or false if the egc is stored entirely within the cell,
Egcs of up to 4 bytes are stored in the cell.
Source§impl Cell
§channel methods
impl Cell
§channel methods
Sourcepub fn set_channels(&mut self, channels: impl Into<Channels>) -> Channels
pub fn set_channels(&mut self, channels: impl Into<Channels>) -> Channels
Sets the channels, returning the previous value.
Sourcepub fn set_fg(&mut self, channel: impl Into<Channel>) -> Channel
pub fn set_fg(&mut self, channel: impl Into<Channel>) -> Channel
Sets the foreground channel, returning the previous value.
Sourcepub fn set_bg(&mut self, channel: impl Into<Channel>) -> Channel
pub fn set_bg(&mut self, channel: impl Into<Channel>) -> Channel
Sets the background channel, returning the previous value.
Sourcepub fn cset_channels(self, channels: impl Into<Channels>) -> Self
pub fn cset_channels(self, channels: impl Into<Channels>) -> Self
Chain-sets the channels.
Source§impl Cell
§alpha methods
impl Cell
§alpha methods
Sourcepub fn set_fg_alpha(&mut self, foreground: Alpha) -> Alpha
pub fn set_fg_alpha(&mut self, foreground: Alpha) -> Alpha
Sets the foreground alpha, returning the previous value.
Sourcepub fn set_bg_alpha(&mut self, background: Alpha) -> Alpha
pub fn set_bg_alpha(&mut self, background: Alpha) -> Alpha
Gets the background alpha, returning the previous value.
Source§impl Cell
§style methods
impl Cell
§style methods
Sourcepub fn set_styles(&mut self, styles: impl Into<Style>) -> Style
pub fn set_styles(&mut self, styles: impl Into<Style>) -> Style
Sets the styles, returning the previous value.
Sourcepub fn add_styles(&mut self, styles: impl Into<Style>) -> Style
pub fn add_styles(&mut self, styles: impl Into<Style>) -> Style
Adds the specified styles, returning the previous value.
Sourcepub fn del_styles(&mut self, styles: impl Into<Style>) -> Style
pub fn del_styles(&mut self, styles: impl Into<Style>) -> Style
Deletes the specified styles, returning the previous value.
Sourcepub fn cset_style(self, styles: impl Into<Style>) -> Self
pub fn cset_style(self, styles: impl Into<Style>) -> Self
Chain-sets the styles.