~/bend-docscommunity

restore_raw_owner.bend checks

raw source on the hub · import 0x67fd5084c1da4adc13317822045bb11f/restore_raw_owner.bend as Restore_raw_owner

4 imports
import Base
import ./decode_data.bend as D
import ./snapshot_data.bend as Snapshot
import ./restore_raw.bend as Raw

Types

type Returned source · line 9 · raw

@Owner:Type -> @Runtime:Type -> @Output:Type -> Type

ParseRejected returns actual unchanged owner/runtime with original Raw/error. Delivered retains original Raw beside the restore callback's actual Output; its inner outcome/recovery determines semantic restore success or refusal.

Templates

template parsed source · line 12 · raw

@-Owner:Type -> @-Runtime:Type -> @-Output:Type -> @-run:(@_:Owner -> @_:Runtime -> @_:0x67fd5084c1da4adc13317822045bb11f/snapshot_data.Snapshot -> Output) -> @+original:0x67fd5084c1da4adc13317822045bb11f/decode_data.Raw -> @owner:Owner -> @runtime:Runtime -> @result:0x67fd5084c1da4adc13317822045bb11f/restore_raw.Parsed -> Returned<Owner, Runtime, Output>

template run source · line 21 · raw

@-Owner:Type -> @-Runtime:Type -> @-Output:Type -> @-restore:(@_:Owner -> @_:Runtime -> @_:0x67fd5084c1da4adc13317822045bb11f/snapshot_data.Snapshot -> Output) -> @owner:Owner -> @runtime:Runtime -> @+input:0x67fd5084c1da4adc13317822045bb11f/decode_data.Raw -> Returned<Owner, Runtime, Output>

Parse before invoking the closed typed restore callback. Parse failure does not call restore or consume its actual owners; success transfers owner/runtime and Snapshot exactly once. Callback Output must retain whatever owners/results its contract requires; this generic wrapper adds no rollback or recovery guarantee. See docs/parity/restore-basic.md and its RawOwner.run consumer.