~/bend-docscommunity

state.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.5/state.bend as State

3 imports
import Base
import capabilities.bend as Cap
import component.bend as C

Types

type WriteStatus source · line 7 · raw

@WriteError:Data -> Data

Consumer-owned vocabulary, equality, legal move enum and endpoints are trusted declarations. Local acceptance never commits the surrounding transaction.

type Outcome source · line 10 · raw

@Value:Data -> @WriteError:Data -> Data

type TypedRawOutcome source · line 39 · raw

@Raw:Data -> @Error:Data -> @WriteError:Data -> Data

Exact caller-error preservation; the caller's decoder validates its own Raw. Returning Raw on refusal retains the supplied finite input independently of whatever diagnostic representation the caller places inside Error.

Templates

template move_written source · line 15 · raw

@-H:Type -> @-Value:Data -> @-WriteError:Data -> @pair:Pair(H, WriteStatus<WriteError>) -> Pair(H, Outcome<Value, WriteError>)

template apply source · line 19 · raw

@-H:Type -> @-Value:Data -> @-WriteError:Data -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @+expected:Value -> @+target:Value -> @+actual:Value -> @owner:H -> @same:Bool -> Pair(H, Outcome<Value, WriteError>)

template observed source · line 23 · raw

@-H:Type -> @-Value:Data -> @-WriteError:Data -> @-equal:(@_:Value -> @_:Value -> Bool) -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @+expected:Value -> @+target:Value -> @pair:Pair(H, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/component.Access<Value>) -> Pair(H, Outcome<Value, WriteError>)

template compare_set source · line 28 · raw

@-H:Type -> @-Value:Data -> @-WriteError:Data -> @-equal:(@_:Value -> @_:Value -> Bool) -> @-read:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Read<H, Value> -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @owner:H -> @+expected:Value -> @+target:Value -> Pair(H, Outcome<Value, WriteError>)

template with_endpoints source · line 30 · raw

@-H:Type -> @-Value:Data -> @-WriteError:Data -> @-equal:(@_:Value -> @_:Value -> Bool) -> @-read:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Read<H, Value> -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @owner:H -> @pair:Pair(Value, Value) -> Pair(H, Outcome<Value, WriteError>)

template transition source · line 33 · raw

@-H:Type -> @-Value:Data -> @-Move:Data -> @-WriteError:Data -> @-equal:(@_:Value -> @_:Value -> Bool) -> @-endpoints:(@_:Move -> Pair(Value, Value)) -> @-read:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Read<H, Value> -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @owner:H -> @move:Move -> Pair(H, Outcome<Value, WriteError>)

template written_result source · line 43 · raw

@-H:Type -> @-Raw:Data -> @-Error:Data -> @-WriteError:Data -> @raw:Raw -> @pair:Pair(H, WriteStatus<WriteError>) -> Pair(H, TypedRawOutcome<Raw, Error, WriteError>)

template result_observed source · line 47 · raw

@-H:Type -> @-Value:Data -> @-Raw:Data -> @-Error:Data -> @-WriteError:Data -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @owner:H -> @raw:Raw -> @decoded:Result<&2, &1, Error, Value> -> Pair(H, TypedRawOutcome<Raw, Error, WriteError>)

template result_raw_inner source · line 51 · raw

@-H:Type -> @-Value:Data -> @-Raw:Data -> @-Error:Data -> @-WriteError:Data -> @-decode:(@_:Raw -> Result<&2, &1, Error, Value>) -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @owner:H -> @+raw:Raw -> Pair(H, TypedRawOutcome<Raw, Error, WriteError>)

template set_raw_result source · line 53 · raw

@-H:Type -> @-Value:Data -> @-Raw:Data -> @-Error:Data -> @-WriteError:Data -> @-decode:(@_:Raw -> Result<&2, &1, Error, Value>) -> @-write:0x2a0aaf4f2cb3f416a9b91fd887916a5d/capabilities.Request<H, Value, WriteStatus<WriteError>> -> @owner:H -> @raw:Raw -> Pair(H, TypedRawOutcome<Raw, Error, WriteError>)