Derive Macro yoke_derive::ZeroCopyFrom
source · [−]#[derive(ZeroCopyFrom)]
{
// Attributes available to this derive:
#[yoke]
}
Expand description
Custom derive for yoke::ZeroCopyFrom
,
This implements ZeroCopyFrom<Ty> for Ty
for types
without a lifetime parameter, and ZeroCopyFrom<Ty<'data>> for Ty<'static>
for types with a lifetime parameter.
Apply the #[yoke(cloning_zcf)]
attribute if you wish for this custom derive
to use .clone()
for its implementation. The attribute can be applied to
fields as well.