Skip to main content

Crate fieldmasker_derive

Crate fieldmasker_derive 

Source
Expand description

Derive macro for fieldmasker::MaskSpec.

§Features

  • Structs with named fields: builds an Object schema using field names, honoring Serde field attributes.
  • Newtype tuple structs: delegate to the inner type’s schema.
  • Other tuple structs, enums, and unions: treated as scalar.

§Serde attributes honored

  • #[serde(rename = "...")]
  • #[serde(rename(serialize = "..."))] (preferred when present)
  • #[serde(rename_all = "...")] on the container
  • #[serde(skip)] / #[serde(skip_serializing)]

§Unsupported (for now)

  • #[serde(flatten)] — emits a compile error. Support can be added once the core crate exposes object-schema accessors at runtime.

Derive Macros§

MaskSpec
Derive fieldmasker::MaskSpec for a type.