From 92f77c8fb9c32f3ce2f7a5b8daa20bd901451aac Mon Sep 17 00:00:00 2001 From: Zachary S Date: Sun, 28 Jul 2024 01:18:50 -0500 Subject: [PATCH] doc update --- derive/src/traits.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/derive/src/traits.rs b/derive/src/traits.rs index 10e583e..c31ab43 100644 --- a/derive/src/traits.rs +++ b/derive/src/traits.rs @@ -44,6 +44,11 @@ pub trait Derivable { fn explicit_bounds_attribute_name() -> Option<&'static str> { None } + + /// If this trait has a custom meaning for "perfect derive", this function + /// should be overridden to return `Some`. + /// + /// The default is "the fields of a struct; unions and enums not supported". fn perfect_derive_fields(input: &DeriveInput) -> Option { None }