Struct ambient_ui::editor::MinimalListEditorItem
source · pub struct MinimalListEditorItem<T: Debug + Clone + Default + Sync + Send + 'static> {
pub value: T,
pub on_change: Option<Cb<dyn Fn(T) + Sync + Send>>,
pub on_delete: Option<Cb<dyn Fn() + Sync + Send>>,
pub item_opts: EditorOpts,
pub item_editor: Cb<dyn Fn(T, Option<Cb<dyn Fn(T) + Sync + Send>>, EditorOpts) -> Element + Sync + Send>,
}
Expand description
A single item in a list editor
Fields§
§value: T
The value of the item.
on_change: Option<Cb<dyn Fn(T) + Sync + Send>>
A callback that is called when the item is changed.
on_delete: Option<Cb<dyn Fn() + Sync + Send>>
A callback that is called when the item is deleted.
item_opts: EditorOpts
Options for the item editor.
item_editor: Cb<dyn Fn(T, Option<Cb<dyn Fn(T) + Sync + Send>>, EditorOpts) -> Element + Sync + Send>
The editor for the item.
Trait Implementations§
source§impl<T: Clone + Debug + Clone + Default + Sync + Send + 'static> Clone for MinimalListEditorItem<T>
impl<T: Clone + Debug + Clone + Default + Sync + Send + 'static> Clone for MinimalListEditorItem<T>
source§fn clone(&self) -> MinimalListEditorItem<T>
fn clone(&self) -> MinimalListEditorItem<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 MinimalListEditorItem<T>
impl<T> Send for MinimalListEditorItem<T>
impl<T> Sync for MinimalListEditorItem<T>
impl<T> Unpin for MinimalListEditorItem<T>where
T: Unpin,
impl<T> !UnwindSafe for MinimalListEditorItem<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.