pub enum SchemaDef {
Object {
fields: &'static [FieldDef],
},
Enum {
repr: EnumRepr,
variants: &'static [VariantDef],
},
Unknown,
}Expand description
Structured description of a schema’s shape.
Replaces the zod_ts: fn() -> String closure. The runtime resolution pass
converts this into a ResolvedSchema (in codegen/ir.rs) before emission.
Variants§
Object
Enum
Unknown
Used by handler-macro fallback registrations that have no structural
information (the user hasn’t added #[derive(ZodTs)] yet).
Trait Implementations§
Auto Trait Implementations§
impl Forget for SchemaDef
impl Freeze for SchemaDef
impl RefUnwindSafe for SchemaDef
impl Send for SchemaDef
impl Sync for SchemaDef
impl Unpin for SchemaDef
impl UnsafeUnpin for SchemaDef
impl UnwindSafe for SchemaDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more