Skip to main content

build_layer_type

Function build_layer_type 

Source
pub fn build_layer_type<P: LayerPlugin>(
    plugin: P,
) -> Result<&'static DynamicLayerType>
Expand description

Validates and initializes a LayerPlugin into a reusable &'static DynamicLayerType.

Hosts that register the same plugin into multiple crate::RegistryBuilders can build it once (e.g. in a std::sync::LazyLock) and pass the returned type to crate::RegistryBuilder::add_dynamic_layer_type.