Skip to main content

ComponentBundle

Trait ComponentBundle 

Source
pub trait ComponentBundle: Sized {
    // Required methods
    fn config_key() -> &'static str;
    fn from_toml(value: Value) -> Result<Self, CamelError>;
    fn register_all(self, ctx: &mut dyn ComponentRegistrar);
}
Expand description

A bundle groups one or more related component schemes and their shared config.

Bundles own their TOML key and deserialize their own config block. camel-cli uses register_bundle! to wire them.

Required Methods§

Source

fn config_key() -> &'static str

Key under [components.] in Camel.toml.

Source

fn from_toml(value: Value) -> Result<Self, CamelError>

Deserialize the raw toml::Value block for this bundle.

Source

fn register_all(self, ctx: &mut dyn ComponentRegistrar)

Register all schemes this bundle owns into the context.

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§