Struct ambient_ui_native::KeyValueEditor
source · pub struct KeyValueEditor<K, V>where
K: Editor + Debug + Clone + Default + Hash + PartialEq<K> + Eq + PartialOrd<K> + Ord + Sync + Send + 'static,
V: Editor + Debug + Clone + Default + Sync + Send + 'static,{
pub value: HashMap<K, V, RandomState>,
pub on_change: Option<Arc<CbDebuggable<dyn Fn(HashMap<K, V, RandomState>) + Sync + Send + 'static>>>,
}
Expand description
Fields§
§value: HashMap<K, V, RandomState>
The value to edit.
on_change: Option<Arc<CbDebuggable<dyn Fn(HashMap<K, V, RandomState>) + Sync + Send + 'static>>>
A callback that is called when the value is changed.
Trait Implementations§
source§impl<K, V> Clone for KeyValueEditor<K, V>where
K: Clone + Editor + Debug + Default + Hash + PartialEq<K> + Eq + PartialOrd<K> + Ord + Sync + Send + 'static,
V: Clone + Editor + Debug + Default + Sync + Send + 'static,
impl<K, V> Clone for KeyValueEditor<K, V>where K: Clone + Editor + Debug + Default + Hash + PartialEq<K> + Eq + PartialOrd<K> + Ord + Sync + Send + 'static, V: Clone + Editor + Debug + Default + Sync + Send + 'static,
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>where
K: Debug + Editor + Clone + Default + Hash + PartialEq<K> + Eq + PartialOrd<K> + Ord + Sync + Send + 'static,
V: Debug + Editor + Clone + Default + Sync + Send + 'static,
impl<K, V> Debug for KeyValueEditor<K, V>where K: Debug + Editor + Clone + Default + Hash + PartialEq<K> + Eq + PartialOrd<K> + Ord + Sync + Send + 'static, V: Debug + Editor + Clone + Default + Sync + Send + 'static,
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>where K: Unpin, V: Unpin,
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> ComponentValueBase for Twhere
T: Send + Sync + 'static,
impl<T> ComponentValueBase for Twhere T: Send + Sync + 'static,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.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.