pub trait AllHooks {
type Common: CommonHooks;
type Master: MasterHooks;
type Slave: SlaveHooks;
type Rgb: RgbHooks;
// Required method
fn destructure(
self,
) -> Hooks<Self::Common, Self::Master, Self::Slave, Self::Rgb>;
}Expand description
Makes it easier to pass around all hooks as a single type.
Without this trait, users would need to write out the full type of hooks like: Hooks<impl CommonHooks, impl MasterHooks, impl SlaveHooks, impl RgbHooks>.
And this trait is implemented for Hooks<CH, MH, SH, RH> so users can just write impl AllHooks.
Though this trait is not sealed, it is not recommended to implement this trait for your own types.
RKTK API Docs