Struct ambient_ui::editor::MinimalListEditor
source · pub struct MinimalListEditor<T: Editor + Debug + Clone + Default + Sync + Send + 'static> {
pub value: Vec<T>,
pub on_change: Option<Cb<dyn Fn(Vec<T>) + Sync + Send>>,
pub item_opts: EditorOpts,
pub add_presets: Option<Vec<T>>,
pub add_title: String,
}
Expand description
A MinimalListEditorWithItemEditor that uses the default editor for the items.
Fields§
§value: Vec<T>
The list of items to edit.
on_change: Option<Cb<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 for the add button.
Trait Implementations§
source§impl<T: Clone + Editor + Debug + Clone + Default + Sync + Send + 'static> Clone for MinimalListEditor<T>
impl<T: Clone + Editor + Debug + Clone + Default + Sync + Send + 'static> Clone for MinimalListEditor<T>
source§fn clone(&self) -> MinimalListEditor<T>
fn clone(&self) -> MinimalListEditor<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 moreAuto Trait Implementations§
impl<T> !RefUnwindSafe for MinimalListEditor<T>
impl<T> Send for MinimalListEditor<T>
impl<T> Sync for MinimalListEditor<T>
impl<T> Unpin for MinimalListEditor<T>where
T: Unpin,
impl<T> !UnwindSafe for MinimalListEditor<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.