pub struct Context<W> where
    W: Widget
{ /* private fields */ }
Expand description

Enables Widgets to send commands to the Transmogrifier.

Implementations

Create a new Context.

Returns the current application context.

Returns the window for this context.

Send command to the transmogrifier.

Send command to the widget.

Returns the registration of the widget that this context is for.

Returns the registration of the widget that this context is for.

Maps the widget of this context.

Maps the widget of this context with mutability.

Invokes with_fn with the widget widget_id and a Context. Returns the result.

Returns None if OW does not match the type of the widget contained.

Invokes with_fn with the widget widget_id and a Context. Returns the result.

Returns None if OW does not match the type of the widget contained.

Returns an unscheduled timer that will invoke callback once after period elapses.

Returns the frontend that created this context.

Methods from Deref<Target = WidgetStorage>

Returns the application.

Register a widget with storage.

Allocates a widget registration. This allows obtaining a registration before the widget has been created, allowing for a parent widget to pass its id to its children during widget construction. Attempting to interact with this widget before calling register with the created widget will panic.

Panics

Panics on internal locking failures.

Returns the state of the widget with id widget_id.

Panics

Panics if internal lock handling results in an error.

Returns the state of the widget with id widget_id.

Panics

Panics if internal lock handling results in an error.

Executes callback with the widget state parameters.

Panics

Panics if internal lock handling results in an error.

Marks a widget as having messages. If this isn’t set, pending messages will not be received.

Panics

Panics if internal lock handling results in an error.

Localizes key with parameters.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

Returns the underlying type as Any.

Returns the underlying type as Any.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more