Struct ambient_api::prelude::OffscreenEditor
source · pub struct OffscreenEditor<T> {
pub value: T,
pub opts: EditorOpts,
pub editor: Arc<CbDebuggable<dyn Fn(T, Option<Arc<CbDebuggable<dyn Fn(T) + Sync + Send>>>, EditorOpts) -> Element + Sync + Send>>,
pub on_confirm: Option<Arc<CbDebuggable<dyn Fn(T) + Sync + Send>>>,
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: Arc<CbDebuggable<dyn Fn(T, Option<Arc<CbDebuggable<dyn Fn(T) + Sync + Send>>>, EditorOpts) -> Element + Sync + Send>>
The editor to use.
on_confirm: Option<Arc<CbDebuggable<dyn Fn(T) + Sync + Send>>>
Callback for when the value is confirmed.
title: String
The title of the editor.
Trait Implementations§
source§impl<T> Clone for OffscreenEditor<T>where
T: Clone,
impl<T> Clone for OffscreenEditor<T>where
T: Clone,
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 for OffscreenEditor<T>where
T: Debug,
impl<T> Debug for OffscreenEditor<T>where
T: Debug,
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.