Expand description
Batch updated variables in an app context.
§Crate
This crate is part of the zng
project.
§Cargo Features
This crate provides 2 feature flags, 1 enabled by default.
§"debug_default"
Signal the build script to enable the "dyn_*"
features in debug builds.
Enabled by default.
§"dyn_closure"
Box closures at opportune places, such as Var::map
, reducing the number of monomorphised types.
This speeds-up compilation time at the cost of runtime.
Modules§
- Var animation types and functions.
- Other variable types.
Macros§
- Declares new
ContextVar
static items. - New variable from an expression with interpolated vars.
- Implements
T: IntoVar<U>
,T: IntoValue<U>
and optionallyU: From<T>
without boilerplate. - Initializes a new
Var
with value made by merging multiple other variables. - Initializes a new conditional var.
Structs§
- Arguments for
AnyVar::hook_any
. - Arc value that implements equality by pointer comparison.
- Reference counted read/write variable.
- Identifies the unique context a
ContextualizedVar
is in. - Represents another variable in a context.
- Represents a single value as
Var<T>
. - Build a merge-var from any number of input vars of the same type
I
. - Represents a
Vec<T>
that tracks changes when used inside a variable. - Args for
Var::trace_value
. - Variable updates and animation service.
- VARS APP integration.
- Kinds of interactions allowed by a
Var<T>
in the current update. - Handle to a variable hook.
- Represents a collection of var handles.
- Arguments for
Var::hook
. - Error when an attempt to modify a variable without the
MODIFY
capability is made. - Represents the current value in a
Var::modify
handler. - Represents an
AnyVar
pointer that can be used for comparison. - Represents the last time a variable was mutated or the current update cycle.
Traits§
- Methods of
Var<T>
that are object safe. - Trait implemented for all
VarValue
types. - Represents a weak reference to an
AnyVar
. - A property value that is not a variable but can be inspected.
- A value-to-var conversion that consumes the value.
- Represents an observable value.
- Represents a type that can be a
Var<T>
value. - Represents a weak reference to a
Var<T>
.
Functions§
- Variable for getter properties (
get_*
,actual_*
). - New
ResponseVar
in the done state. - New paired
ResponderVar
andResponseVar
in the waiting state. - Variable for state properties (
is_*
,has_*
). - New ref counted read/write variable with initial
value
. - New ref counted read/write variable with default initial value.
- New ref counted read/write variable with initial value converted from
source
.
Type Aliases§
- Represents a type erased boxed var.
- Represents a weak reference to a
BoxedAnyVar
. - Represents a
Var<T>
boxed. - Represents a weak reference to a
BoxedVar<T>
. - Read-only
ArcVar<T>
. - Context var that is always read-only, even if it is representing a read-write var.
- Variable used to notify the completion of an async operation.
- Variable used to listen to a one time signal that an async operation has completed.