Logo Orsak

CompletingScope<'Scope> Type

Opens scopes of type that are completed when their effect succeeds, such as transactions, for effects needing an environment grown from the one the scoped effect is run with.

Static members

Static member Description

CompletingScope.Within(body)

Full Usage: CompletingScope.Within(body)

Parameters:
    body : Effect<'Inner, 'a, 'err> - The effect to run in the scope, an effect of the grown environment.

Returns: Effect<'Outer, 'a, 'err> An effect of the outer environment, which no longer needs what the scope provides.
Type parameters: 'Inner, 'a, 'err

Runs body in a new scope, and completes the scope if body succeeds. The scope is begun by the environment, which grows into the environment of body, and disposed when body ends, without being completed if it failed or threw. An exception is not caught: it propagates once the scope is disposed.

body : Effect<'Inner, 'a, 'err>

The effect to run in the scope, an effect of the grown environment.

Returns: Effect<'Outer, 'a, 'err>

An effect of the outer environment, which no longer needs what the scope provides.

Type something to start searching.