Crate cgp_component

Source
Expand description

This crate defines the core CGP types and traits used to enable the core CGP component implementation.

Structs§

UseContext
The UseContext pattern 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 UseDelegate pattern is used as the default dispatcher for CGP components that contain additional generic parameters in their traits.
UseFields
WithProvider

Traits§

CanUseComponent
This is a convenient type alias that is used in the same way as IsProviderFor, but with the Self type being the Context type rather than the Provider type that implements the provider trait.
DelegateComponent
This is the core trait used by the delegate_component! macro to define a mapping from Name to Delegate on the target Self type.
HasCgpProvider
This trait is used by the blanket implementations of CGP consumer traits to forward the implementation to the CgpProvider type, which impements the corresponding provider trait.
IsProviderFor
The IsProviderFor trait is used to propagate the constraints required to implement the provider trait that corresponds to the Component type.

Type Aliases§

WithContext