Struct ambient_api::prelude::ArrayEditor
source · pub struct ArrayEditor<const C: usize, T> {
pub value: [T; C],
pub field_names: Option<&'static [&'static str; C]>,
pub on_change: Arc<CbDebuggable<dyn Fn([T; C]) + Sync + Send>>,
}
Expand description
An editor for a fixed-size array.
Fields§
§value: [T; C]
The array to edit.
field_names: Option<&'static [&'static str; C]>
The names of the fields of the array.
on_change: Arc<CbDebuggable<dyn Fn([T; C]) + Sync + Send>>
Callback for when the array is changed.
Trait Implementations§
source§impl<const C: usize, T> Clone for ArrayEditor<C, T>where
T: Clone,
impl<const C: usize, T> Clone for ArrayEditor<C, T>where
T: Clone,
source§fn clone(&self) -> ArrayEditor<C, T>
fn clone(&self) -> ArrayEditor<C, 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<const C: usize, T> !RefUnwindSafe for ArrayEditor<C, T>
impl<const C: usize, T> Send for ArrayEditor<C, T>where
T: Send,
impl<const C: usize, T> Sync for ArrayEditor<C, T>where
T: Sync,
impl<const C: usize, T> Unpin for ArrayEditor<C, T>where
T: Unpin,
impl<const C: usize, T> !UnwindSafe for ArrayEditor<C, 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.