Skip to main content

Module schema

Module schema 

Source
Expand description

§Schema hooks (DogRS-native)

Feathers-ish schema utilities:

  • ResolveData: mutate ctx.data for write methods
  • ValidateData: validate ctx.data for write methods

Key detail: resolvers/validators take &HookMeta<R,P> (immutable view) to avoid borrow conflicts with &mut ctx.data.

Structs§

HookMeta
Immutable view of the hook context (safe to pass while mutating ctx.data).
ResolveData
Resolve/mutate ctx.data for create/patch/update. (Feathers resolveData)
Rules
Tiny “rules” helper for nicer validation errors.
SchemaBuilder
Fluent builder used by ServiceHooks::schema(...).
ValidateData
Validate ctx.data for create/patch/update. (Feathers validateData)

Enums§

WriteMethods
Which write methods should a schema hook apply to?

Traits§

SchemaHooksExt
Extension method: hooks.schema(|s| ...)

Type Aliases§

ResolveFn
ValidateFn