Module macro_tools::generics

source ·
Expand description

Manipulations on generic parameters.

§Example of generic parameters


 pub struct CommandFormer< K, Context = () >
 where
   K : core::hash::Hash + std::cmp::Eq,
 {
   properties : core::option::Option< std::collections::HashMap< K, String > >,
   _phantom : core::marker::PhantomData< Context >,
 }

 impl< K, Context >
 CommandFormer< K, Context >
 where
   K : core::hash::Hash + std::cmp::Eq,
 {}

Modules§

  • Exposed namespace of the module.
  • Orphan namespace of the module.
  • Prelude to use essentials: use my_module::prelude::*.
  • Protected namespace of the module.

Functions§

  • Merges two syn::Generics instances into a new one.
  • Extracts parameter names from the given Generics, dropping bounds, defaults, and the where clause.