Attribute Macro derive_where::derive_where

source ·
#[derive_where]
Expand description

Item-level options:

  • #[derive_where(crate = path)]: Specify path to the derive_where crate.
  • #[derive_where(Clone, ..; T, ..)]: Specify traits to implement and optionally bounds.
    • #[derive_where(Zeroize(crate = path))]: Specify path to Zeroize trait.
    • #[derive_where(ZeroizeOnDrop(crate = path))]: Specify path to ZeroizeOnDrop trait.
  • #[derive_where(skip_inner(EqHashOrd, ..))]: Skip all fields in the item. Optionally specify trait groups to constrain skipping fields. Only works for structs, for enums use this on the variant-level.

Variant-level options:

  • #[derive_where(default)]: Uses this variant as the default for the Default implementation.
  • #[derive_where(skip_inner(EqHashOrd, ..))]: Skip all fields in this variant. Optionally specify trait groups to constrain skipping fields.

Field-level options:

  • #[derive_where(skip(EqHashOrd, ...))]: Skip field. Optionally specify trait groups to constrain skipping field.
  • #[derive_where(Zeroize(fqs))]: Use fully-qualified-syntax when implementing Zeroize.

See the crate level description for more details.