Runtime class final

Executes Effects against the environment built from a Module.

Available extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Whether this Runtime no longer accepts new work.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
services Services
Read-only access to the runtime's services at application boundaries.
no setter
state RuntimeState
The current lifecycle state.
no setter

Methods

close({Duration gracePeriod = Duration.zero, bool interruptAfterGracePeriod = false}) Future<void>
Close this runtime and release module-owned resources.
execute<A extends Object, E extends Object>(Effect<A, E> effect, {String? label}) EffectExecution<A, E>
Start a managed Effect execution.
executeWith<A extends Object, E extends Object>(Module module, Effect<A, E> effect, {String? label}) EffectExecution<A, E>

Available on Runtime, provided by the RuntimeExecutionModuleOps extension

Start a managed execution with temporary providers and resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run<A extends Object, E extends Object>(Effect<A, E> effect, {String? executionLabel}) Future<ResultDart<A, E>>
Run an Effect and convert unexpected defects back into thrown errors.
runExit<A extends Object, E extends Object>(Effect<A, E> effect, {String? executionLabel}) Future<Exit<A, E>>
Run an Effect while preserving success, failure, and defects in Exit.
runExitWith<A extends Object, E extends Object>(Module module, Effect<A, E> effect, {String? executionLabel}) Future<Exit<A, E>>

Available on Runtime, provided by the RuntimeExecutionModuleOps extension

Run an Effect with a temporary Module while preserving every Exit.
runWith<A extends Object, E extends Object>(Module module, Effect<A, E> effect, {String? executionLabel}) Future<ResultDart<A, E>>

Available on Runtime, provided by the RuntimeExecutionModuleOps extension

Run an Effect with a temporary Module and return its typed Result.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

start(Module module, {ResolverBackend? backend, CleanupFailureObserver? cleanupFailureObserver, Iterable<RuntimeObserver> observers = const <RuntimeObserver>[], RuntimeObserverErrorHandler? observerErrorHandler}) Future<Runtime>
Build a runtime, install constructor bindings, and acquire resources.