Struct ambient_ui::editor::ListEditor
source · pub struct ListEditor<T: Editor + Debug + Clone + Default + Sync + Send + 'static> {
pub value: Vec<T>,
pub on_change: Option<Cb<dyn Fn(Vec<T>) + Sync + Send>>,
}
Expand description
An editor for a list of items that implement Editor; each item can be edited, moved up or down, or deleted.
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.
Implementations§
Trait Implementations§
source§impl<T: Clone + Editor + Debug + Clone + Default + Sync + Send + 'static> Clone for ListEditor<T>
impl<T: Clone + Editor + Debug + Clone + Default + Sync + Send + 'static> Clone for ListEditor<T>
source§fn clone(&self) -> ListEditor<T>
fn clone(&self) -> ListEditor<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 ListEditor<T>
impl<T> Send for ListEditor<T>
impl<T> Sync for ListEditor<T>
impl<T> Unpin for ListEditor<T>where
T: Unpin,
impl<T> !UnwindSafe for ListEditor<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.