pub struct INSPECTOR;Expand description
Service that configures the live inspector.
Implementations§
Source§impl INSPECTOR
impl INSPECTOR
Sourcepub fn register_watcher(
&self,
watcher: impl FnMut(&InspectedWidget, &mut InspectorWatcherBuilder) + Send + Sync + 'static,
)
pub fn register_watcher( &self, watcher: impl FnMut(&InspectedWidget, &mut InspectorWatcherBuilder) + Send + Sync + 'static, )
Register a watcher that provides custom live state variables.
In the default live inspector the watcher closure is called for the selected widget and the watcher values are presented
in the /* INFO */ section of the properties panel.
Note that newly registered watchers only apply for subsequent inspections, it does not refresh current views.
Sourcepub fn build_watchers(&self, target: &InspectedWidget) -> Vec<(Txt, Var<Txt>)>
pub fn build_watchers(&self, target: &InspectedWidget) -> Vec<(Txt, Var<Txt>)>
Call all registered watchers on the target.
Returns a vector of unique name and watcher variable, sorted by name.
Auto Trait Implementations§
impl Freeze for INSPECTOR
impl RefUnwindSafe for INSPECTOR
impl Send for INSPECTOR
impl Sync for INSPECTOR
impl Unpin for INSPECTOR
impl UnwindSafe for INSPECTOR
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> 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