Skip to main content

TypeShift

Derive Macro TypeShift 

Source
#[derive(TypeShift)]
{
    // Attributes available to this derive:
    #[validate]
    #[serde]
    #[schemars]
}
Expand description

Derives serde, validator, and schemars support required by typeshift.

Supported inputs:

  • structs (named, tuple, unit)
  • enums (unit and data-carrying variants)
  • generic types

Unions are intentionally rejected.

Generated behavior is equivalent to deriving:

  • serde::Serialize
  • serde::Deserialize
  • validator::Validate
  • schemars::JsonSchema