Struct ambient_api::prelude::MinimalListEditor
source · pub struct MinimalListEditor<T>where
T: Editor + Debug + Clone + Default + Sync + Send + 'static,{
pub value: Vec<T>,
pub on_change: Option<Arc<CbDebuggable<dyn Fn(Vec<T>) + Send + Sync>>>,
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<Arc<CbDebuggable<dyn Fn(Vec<T>) + Send + Sync>>>
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 for MinimalListEditor<T>where
T: Clone + Editor + Debug + Default + Sync + Send + 'static,
impl<T> Clone for MinimalListEditor<T>where T: Clone + Editor + Debug + Default + Sync + Send + 'static,
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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where T: AsAny,
Forward to the method defined on the type
Any
.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.