pub struct CellRenderer { /* private fields */ }Expand description
Renders a cell with the configured selection style
Implementations§
Source§impl CellRenderer
impl CellRenderer
pub fn new(style_config: CellSelectionStyle) -> Self
Sourcepub fn get_selected_style(&self) -> Style
pub fn get_selected_style(&self) -> Style
Create a style for a selected cell based on configuration
Sourcepub fn render_cell_value(
&self,
value: &str,
is_selected: bool,
width: usize,
) -> String
pub fn render_cell_value( &self, value: &str, is_selected: bool, width: usize, ) -> String
Render a cell value with optional border/corner decorations
Sourcepub fn get_style_previews() -> Vec<(&'static str, &'static str)>
pub fn get_style_previews() -> Vec<(&'static str, &'static str)>
Get a preview of all available styles for configuration UI
Auto Trait Implementations§
impl Freeze for CellRenderer
impl RefUnwindSafe for CellRenderer
impl Send for CellRenderer
impl Sync for CellRenderer
impl Unpin for CellRenderer
impl UnwindSafe for CellRenderer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more