Mishka
/
PRODUCTS Mishka CMS Multi-tenant, real-time CMS Chelekom Phoenix UI components + CLI Gervaz Admin DSL for Ash Installer Plugin & event manager on OTP Guarded Struct Validated, sanitized structs
CMS EXTENSIONS Blog Multi-author publishing Documentation Versioned, reviewed docs Migration Other CMSs to Mishka CMS MISHKA All docs Blog Hire us Sponsor
/ Guarded Struct
docs
Overview
GitHub ↗
Overview
Mishka CMS Multi-tenant, real-time CMS Chelekom Phoenix UI components + CLI Gervaz Admin DSL for Ash Installer Plugin & event manager on OTP Guarded Struct You are here CMS · Blog Multi-author publishing CMS · Documentation Versioned, reviewed docs CMS · Migration Other CMSs to Mishka CMS
Home All docs Blog Hire us Sponsor
GitHub ↗
Drawer content

Contents

  • Get Started
  • How-to guides
  • Nest structs with sub_field
  • Accept more than one shape with conditional_field
  • Fill and check fields from other fields
  • Use virtual, dynamic and pattern-keyed fields
  • Write a field validator and a main validator
  • Add your own derive ops
  • Validate input without building a struct
  • Handle and translate errors
  • Inspect, diff and observe structs
  • Use GuardedStruct in an Ash resource
  • Give your coding agent the GuardedStruct rules
  • Concepts
  • How the builder works
  • How derives work
  • Reference
  • DSL reference
  • Derive string syntax
  • Sanitize ops
  • Validate ops
  • API reference
  • Error shapes and actions
  • Configuration
  1. GuardedStruct
Concepts

Concepts

Updated Nov 9, 2026 · v0.1.6

The concept pages explain how GuardedStruct works underneath: what the builder does when a module compiles and when it runs, and how a derive string is read, in what order its ops run and where each op comes from.

Read them when you want to know why a struct builds or fails the way it does.

  • How the builder works How a guardedstruct block compiles and what builder/1 does with an input map: the order of every step, the errors, and how keys become atoms.
  • How derives work How derive strings work: sanitize ops run before validate ops, every op runs, nil is skipped, and ops are found in a set order.
Previous Give your coding agent the GuardedStruct rules
Next How the builder works
0.1.6
  • 0.1.6 latest
  • 0.1.5
  • 0.1.4
  • 0.1.3
Report issue
On this page
Drawer content