pub struct MinimalListEditorWithItemEditor<T>{
pub value: Vec<T>,
pub on_change: Option<Arc<CbDebuggable<dyn Fn(Vec<T>) + Sync + Send>>>,
pub item_opts: EditorOpts,
pub add_presets: Option<Vec<T>>,
pub add_title: String,
pub item_editor: Arc<CbDebuggable<dyn Fn(T, Option<Arc<CbDebuggable<dyn Fn(T) + Sync + Send>>>, EditorOpts) -> Element + Sync + Send>>,
}
Expand description
A configurable list editor that allows you to specify the editor for the items, and to provide other preset options.
Fields§
§value: Vec<T>
The list of items to edit.
on_change: Option<Arc<CbDebuggable<dyn Fn(Vec<T>) + Sync + Send>>>
A callback that is called when the list of items is changed.
item_opts: EditorOpts
Options for the item editor.
add_presets: Option<Vec<T>>
Preset items that can be added to the list.
add_title: String
The title of the add button.
item_editor: Arc<CbDebuggable<dyn Fn(T, Option<Arc<CbDebuggable<dyn Fn(T) + Sync + Send>>>, EditorOpts) -> Element + Sync + Send>>
The editor for the items.
Trait Implementations§
source§impl<T> Clone for MinimalListEditorWithItemEditor<T>
impl<T> Clone for MinimalListEditorWithItemEditor<T>
source§fn clone(&self) -> MinimalListEditorWithItemEditor<T>
fn clone(&self) -> MinimalListEditorWithItemEditor<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> Debug for MinimalListEditorWithItemEditor<T>
impl<T> Debug for MinimalListEditorWithItemEditor<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for MinimalListEditorWithItemEditor<T>
impl<T> Send for MinimalListEditorWithItemEditor<T>
impl<T> Sync for MinimalListEditorWithItemEditor<T>
impl<T> Unpin for MinimalListEditorWithItemEditor<T>where
T: Unpin,
impl<T> !UnwindSafe for MinimalListEditorWithItemEditor<T>
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 T
impl<T> Downcast for T
source§impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.