pub struct EDITORS;
Expand description
Service that provides editor widgets for a given variable.
Auto generating widgets such as a settings list or a properties list can use this service to instantiate widgets for each item.
The main crate registers some common editors.
Implementations§
source§impl EDITORS
impl EDITORS
sourcepub fn register(&self, editor: WidgetFn<EditorRequestArgs>)
pub fn register(&self, editor: WidgetFn<EditorRequestArgs>)
Register an editor
handler.
The handler must return NilUiNode
if it cannot handle the request. Later added handlers are called first.
sourcepub fn register_fallback(&self, editor: WidgetFn<EditorRequestArgs>)
pub fn register_fallback(&self, editor: WidgetFn<EditorRequestArgs>)
Register an editor
handler to be called if none of the register
editors can handle the value.
The handler must return NilUiNode
if it cannot handle the request. Later added handlers are called last.
sourcepub fn get(&self, value: impl AnyVar) -> BoxedUiNode
pub fn get(&self, value: impl AnyVar) -> BoxedUiNode
Instantiate an editor for the value
.
Returns NilUiNode
if no registered editor can handle the value type.
Auto Trait Implementations§
impl Freeze for EDITORS
impl RefUnwindSafe for EDITORS
impl Send for EDITORS
impl Sync for EDITORS
impl Unpin for EDITORS
impl UnwindSafe for EDITORS
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more