Skip to main content

Module scope

Module scope 

Source

Structs§

Awake
Whether a scope is awake, for something it owns to ask on its own.
DescribedState
One reducer as devtools see it.
DropGuard
Blanket teardown for resources that just need dropping (scope.own(DropGuard(resource)) when no specialized impl exists).
Installed
A feature installed in a scope, as devtools see it.
Listener
A subscription a feature made, as devtools see it.
Scope
Where a segment’s state, features and resources live, from the moment it is installed until it is removed.
ScopeGuard
Removes its scope when dropped: for a child that nothing else will remove.
ScopeTree
A tree of scopes, and the owner of every scope in it: letting go of it removes its root and everything under it, the last first.
StateHandle
Subscription

Constants§

MAIN
The outlet a scope sits in unless it is said otherwise.

Traits§

Reducer
State, and how it changes.
Teardown
A resource whose lifetime can be bound to a Scope via Scope::own. Implement per resource kind; the “blanket” over arbitrary T is the DropGuard newtype, so specialized teardowns never overlap.

Type Aliases§

Outlet
Which of its parent’s outlets a scope sits in. A layout has one today, MAIN.
Slot
Where a reducer’s state lives: the current value, shared with whoever read it last.