Crate impl_tools
source · [−]Expand description
Impl-tools
#[autoimpl] is a partial replacement for #[derive], supporting:
- Explicit
whereclause on generic parameters - No implicit bounds on generic parameters beyond those required by the type
- Traits like
Derefbyusinga named field - Traits like
Debugmayignorenamed fields
#[autoimpl] may also be used on trait definitions to re-implement the
trait for given reference types.
impl_scope! is a function-like macro used to define a type plus its
implementations. It supports two things:
impl Selfsyntax- Evaluation of advanced attribute macros, which may use field initializers and read/write other impls within the scope
User-extensions to both #[autoimpl] and impl_scope! are possible, by
writing your own proc-macro crate depending on
impl-tools-lib.
Macros
Scope supporting
impl Self and advanced attribute macrosAttribute Macros
A variant of the standard
derive macroImpl
Default with given field or type initializers