Skip to main content

Module hooks

Module hooks 

Source
Expand description

Generated-model CRUD lifecycle hooks.

Hooks are attached to a schema-bound generated manager. Pre-hooks run in registration order and may reject an operation. Post-hooks run in reverse order after a successful commit; their errors are logged and do not change the committed result.

Structs§

HookContext
Context shared with one generated lifecycle hook.

Enums§

CrudOperation
Generated CRUD operation presented to lifecycle hooks.
HookError
Failure returned by one generated lifecycle hook.
ModelKind
Generated thing kind presented to lifecycle hooks.
PreHookResult
Result of a generated pre-operation hook.

Traits§

LifecycleHook
Object-safe lifecycle hook for an exact generated entity or relation.

Type Aliases§

HookFuture
Boxed future returned by an object-safe generated lifecycle hook.