pub(crate) fn code_generator() -> TracersResult<Box<dyn CodeGenerator>> {
    let bi = BuildInfo::load()?;

    Ok(match bi.implementation.tracing_type() {
        //There are two implementations: one for static tracing (`disabled` is a special case of
        //`static`), and one for dynamic
        TracingType::Disabled | TracingType::Static => Box::new(r#static::StaticGenerator::new(bi)),
        TracingType::Dynamic => Box::new(dynamic::DynamicGenerator::new(bi)),
    })
}
/// Loads the `BuildInfo` and based on its contents creates and returns the applicable
/// `CodeGenerator` implementation
Loads the `BuildInfo` and based on its contents creates and returns the applicable
`CodeGenerator` implementation
Loads the ` BuildInfo ` and based on its contents creates and returns the applicable ` CodeGenerator ` implementation
pub(crate) fn code_generator() -> TracersResult<Box<dyn CodeGenerator>> {
    let bi = BuildInfo::load()?;
    Ok(match bi.implementation.tracing_type() {
        //There are two implementations: one for static tracing (`disabled` is a special case of
        //`static`), and one for dynamic
        TracingType::Disabled | TracingType::Static => Box::new(r#static::StaticGenerator::new(bi)),
        TracingType::Dynamic => Box::new(dynamic::DynamicGenerator::new(bi)),
    })
}
pub ( crate ) fn code_generator ( ) -> TracersResult < Box < dyn CodeGenerator > > { let bi = BuildInfo :: load ( ) ? ; Ok ( match bi . implementation . tracing_type ( ) { //There are two implementations: one for static tracing (`disabled` is a special case of //`static`), and one for dynamic TracingType :: Disabled | TracingType :: Static => Box :: new ( r#static :: StaticGenerator :: new ( bi ) ) , TracingType :: Dynamic => Box :: new ( dynamic :: DynamicGenerator :: new ( bi ) ) , } ) }
Loads the `BuildInfo` and based on its contents creates and returns the applicable
`CodeGenerator` implementation
Loads the ` BuildInfo ` and based on its contents creates and returns the applicable ` CodeGenerator ` implementation