Expand description
This crate defines the core CGP types and traits used to enable the core CGP component implementation.
Structs§
- UseContext
- The
UseContextpattern is used to define a trivial implementation of a provider trait, by forwarding the implementation to the consumer trait implementation of the context. - UseDelegate
- The
UseDelegatepattern is used as the default dispatcher for CGP components that contain additional generic parameters in their traits. - UseFields
- With
Provider
Traits§
- CanUse
Component - This is a convenient type alias that is used in the same way as
IsProviderFor, but with theSelftype being theContexttype rather than theProvidertype that implements the provider trait. - Delegate
Component - This is the core trait used by the
delegate_component!macro to define a mapping fromNametoDelegateon the targetSelftype. - IsProvider
For - The
IsProviderFortrait is used to propagate the constraints required to implement the provider trait that corresponds to theComponenttype.