Struct ambient_api::prelude::KeyValueEditor
source · pub struct KeyValueEditor<K, V>where
K: Editor + Debug + Clone + Default + Hash + PartialEq + Eq + PartialOrd + Ord + Sync + Send + 'static,
V: Editor + Debug + Clone + Default + Sync + Send + 'static,{
pub value: HashMap<K, V>,
pub on_change: Option<Arc<CbDebuggable<dyn Fn(HashMap<K, V>) + Sync + Send>>>,
}
Expand description
Fields§
§value: HashMap<K, V>
The value to edit.
on_change: Option<Arc<CbDebuggable<dyn Fn(HashMap<K, V>) + Sync + Send>>>
A callback that is called when the value is changed.
Trait Implementations§
source§impl<K, V> Clone for KeyValueEditor<K, V>
impl<K, V> Clone for KeyValueEditor<K, V>
source§fn clone(&self) -> KeyValueEditor<K, V>
fn clone(&self) -> KeyValueEditor<K, V>
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<K, V> Debug for KeyValueEditor<K, V>
impl<K, V> Debug for KeyValueEditor<K, V>
source§impl<K, V> ElementComponent for KeyValueEditor<K, V>
impl<K, V> ElementComponent for KeyValueEditor<K, V>
Auto Trait Implementations§
impl<K, V> !RefUnwindSafe for KeyValueEditor<K, V>
impl<K, V> Send for KeyValueEditor<K, V>
impl<K, V> Sync for KeyValueEditor<K, V>
impl<K, V> Unpin for KeyValueEditor<K, V>
impl<K, V> !UnwindSafe for KeyValueEditor<K, V>
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.