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 UiNode::nil 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 UiNode::nil if it cannot handle the request. Later added handlers are called last.
Sourcepub fn get(&self, value: AnyVar) -> UiNode
pub fn get(&self, value: AnyVar) -> UiNode
Instantiate an editor for the value.
Returns UiNode::nil 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