Struct ambient_ui::editor::OffscreenEditor
source · pub struct OffscreenEditor<T> {
pub value: T,
pub opts: EditorOpts,
pub editor: Cb<dyn Fn(T, Option<ChangeCb<T>>, EditorOpts) -> Element + Sync + Send>,
pub on_confirm: Option<ChangeCb<T>>,
pub title: String,
}
Expand description
Delegates a type editor to edit in a new screen
.
Fields§
§value: T
The value to edit.
opts: EditorOpts
Options for the editor.
editor: Cb<dyn Fn(T, Option<ChangeCb<T>>, EditorOpts) -> Element + Sync + Send>
The editor to use.
on_confirm: Option<ChangeCb<T>>
Callback for when the value is confirmed.
title: String
The title of the editor.
Trait Implementations§
source§impl<T: Clone> Clone for OffscreenEditor<T>
impl<T: Clone> Clone for OffscreenEditor<T>
source§fn clone(&self) -> OffscreenEditor<T>
fn clone(&self) -> OffscreenEditor<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 moresource§impl<T: Debug> Debug for OffscreenEditor<T>
impl<T: Debug> Debug for OffscreenEditor<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for OffscreenEditor<T>
impl<T> Send for OffscreenEditor<T>where
T: Send,
impl<T> Sync for OffscreenEditor<T>where
T: Sync,
impl<T> Unpin for OffscreenEditor<T>where
T: Unpin,
impl<T> !UnwindSafe for OffscreenEditor<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.