Attribute Macro kas::autoimpl

#[autoimpl]
Expand description

A variant of the standard derive macro

See impl_tools::autoimpl for full documentation.

The following traits are supported:

Pathignoreusingnotes
[::core::borrow::Borrow<T>]-borrow targetT is type of target field
[::core::borrow::BorrowMut<T>]-borrow targetT is type of target field
[::core::clone::Clone]yes-ignored fields use Default::default()
[::core::cmp::Eq]*-*allowed with PartialEq
[::core::cmp::Ord]yes-
[::core::cmp::PartialEq]yes-
[::core::cmp::PartialOrd]yes-
[::core::convert::AsRef<T>]-ref targetT is type of target field
[::core::convert::AsMut<T>]-ref targetT is type of target field
[::core::default::Default]--impl_default is a more flexible alternative
[::core::fmt::Debug]yes-
[::core::hash::Hash]yes-
[::core::marker::Copy]*-*allowed with Clone
[::core::ops::Deref]-deref targettype Target is type of target field
[::core::ops::DerefMut]-deref targettype Target is type of target field
::kas::classes::HasBool-deref target
::kas::classes::HasStr-deref target
::kas::classes::HasString-deref target
class_traits-deref targetimplements each kas::class trait

Examples

Implement all kas::class trait over a wrapper type:

# use kas_macros::autoimpl;
#[autoimpl(class_traits using self.0 where T: trait)]
struct WrappingType<T>(T);