Skip to main content

ObservabilityBuilder

Trait ObservabilityBuilder 

Source
pub trait ObservabilityBuilder {
    type Plugin: ObservabilityPlugin;

    // Required methods
    fn build(self) -> ObservabilityResult<Self::Plugin>;
    fn with_name(self, name: impl Into<String>) -> Self;
    fn enabled(self, enabled: bool) -> Self;
}
Expand description

Builder trait for creating observability plugins

Required Associated Types§

Required Methods§

Source

fn build(self) -> ObservabilityResult<Self::Plugin>

Build the plugin with the current configuration

Source

fn with_name(self, name: impl Into<String>) -> Self

Set the plugin name

Source

fn enabled(self, enabled: bool) -> Self

Enable/disable the plugin

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§