Module r3_core::kernel::raw_cfg

source ·
Expand description

The low-level kernel static configuration interface to be implemented by a kernel implementor.

General Structure

This module includes the traits for a kernel-specific low-level configurator type, which is used by the kernel static configuration process to receive the specificiations of defined kernel objects and assign their IDs. CfgBase is the supertrait of all these traits and must be implemented by the configurator type. It can optionally can implement other traits as well if they can be supported.

The Cfg${Ty} traits extend CfgBase by providing a method named ${ty}_define to define a kernel object of the corresponding type (${Ty}). The method takes two parameters: ${Ty}Descriptor containing mandatory properties and impl Bag containing additional, implementation-specific properties.

The ${Ty}Descriptor types contain mandatory (both for the consumers and the implementors) properties of a kernel object to be created. They all contain a phantom: PhantomInvariant<System> field to ensure they are always parameterized and invariant over System.

Safety

Most traits in this method are unsafe trait because they have to be trustworthy to be able to build sound memory-safe abstractions on top of them.

Stability

This module is covered by the kernel-side API stability guarantee.

The trait paths in this module are covered by the application-side API stability guarantee. Application code should only use these traits in trait bounds and, to access the provided functionalities, should use the the stable wrapper outside this module instead.

Structs

Traits