pub trait TableEditorState<T> {
type Context<'a>;
type Err;
// Required methods
fn create_value<'a>(
&self,
ctx: &'a Self::Context<'a>,
) -> Result<T, Self::Err>;
fn set_value<'a>(
&mut self,
value: T,
ctx: &'a Self::Context<'a>,
) -> Result<(), Self::Err>;
fn value<'a>(
&mut self,
ctx: &'a Self::Context<'a>,
) -> Result<Option<T>, Self::Err>;
// Provided methods
fn focused_col(&self) -> Option<usize> { ... }
fn start<'a>(
&mut self,
col: Option<usize>,
ctx: &'a Self::Context<'a>,
) -> Result<(), Self::Err> { ... }
fn stop<'a>(&mut self, ctx: &'a Self::Context<'a>) -> Result<(), Self::Err> { ... }
}Expand description
Trait for the editor widget state.
Required Associated Types§
Required Methods§
Sourcefn create_value<'a>(&self, ctx: &'a Self::Context<'a>) -> Result<T, Self::Err>
fn create_value<'a>(&self, ctx: &'a Self::Context<'a>) -> Result<T, Self::Err>
Create a fresh row value with all the defaults.
Provided Methods§
Sourcefn focused_col(&self) -> Option<usize>
fn focused_col(&self) -> Option<usize>
Returns the currently focused column. Used to scroll the column to fully visible.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".