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§
Macros§
- context_
var - Declares new
ContextVarstatic items. - expr_
var - New variable from an expression with interpolated vars.
- impl_
from_ and_ into_ var - Implements
T: IntoVar<U>,T: IntoValue<U>and optionallyU: From<T>without boilerplate. - merge_
var - Initializes a new
Varwith value made by merging multiple other variables. - when_
var - Initializes a new conditional var.
Structs§
- AnyVar
Hook Args - Arguments for
AnyVar::hook_any. - ArcEq
- Arc value that implements equality by pointer comparison.
- ArcVar
- Reference counted read/write variable.
- Context
Init Handle - Identifies the unique context a
ContextualizedVaris in. - Context
Var - Represents another variable in a context.
- Local
Var - Represents a single value as
Var<T>. - Merge
VarBuilder - Build a merge-var from any number of input vars of the same type
I. - Observable
Vec - Represents a
Vec<T>that tracks changes when used inside a variable. - Trace
Value Args - Args for
Var::trace_value. - VARS
- Variable updates and animation service.
- VARS_
APP - VARS APP integration.
- VarCapability
- Kinds of interactions allowed by a
Var<T>in the current update. - VarHandle
- Handle to a variable hook.
- VarHandles
- Represents a collection of var handles.
- VarHook
Args - Arguments for
Var::hook. - VarIs
Read Only Error - Error when an attempt to modify a variable without the
MODIFYcapability is made. - VarModify
- Represents the current value in a
Var::modifyhandler. - VarPtr
- Represents an
AnyVarpointer that can be used for comparison. - VarUpdate
Id - Represents the last time a variable was mutated or the current update cycle.
Traits§
- AnyVar
- Methods of
Var<T>that are object safe. - AnyVar
Value - Trait implemented for all
VarValuetypes. - AnyWeak
Var - Represents a weak reference to an
AnyVar. - Into
Value - A property value that is not a variable but can be inspected.
- IntoVar
- A value-to-var conversion that consumes the value.
- Var
- Represents an observable value.
- VarValue
- Represents a type that can be a
Var<T>value. - WeakVar
- Represents a weak reference to a
Var<T>.
Functions§
- getter_
var - Variable for getter properties (
get_*,actual_*). - response_
done_ var - New
ResponseVarin the done state. - response_
var - New paired
ResponderVarandResponseVarin the waiting state. - state_
var - Variable for state properties (
is_*,has_*). - var
- New ref counted read/write variable with initial
value. - var_
default - New ref counted read/write variable with default initial value.
- var_
from - New ref counted read/write variable with initial value converted from
source.
Type Aliases§
- Boxed
AnyVar - Represents a type erased boxed var.
- Boxed
AnyWeak Var - Represents a weak reference to a
BoxedAnyVar. - Boxed
Var - Represents a
Var<T>boxed. - Boxed
Weak Var - Represents a weak reference to a
BoxedVar<T>. - Read
Only ArcVar - Read-only
ArcVar<T>. - Read
Only Context Var - Context var that is always read-only, even if it is representing a read-write var.
- Responder
Var - Variable used to notify the completion of an async operation.
- Response
Var - Variable used to listen to a one time signal that an async operation has completed.