Skip to main content

Component

Trait Component 

Source
pub trait Component: Send + Sync {
    // Required methods
    fn scheme(&self) -> &str;
    fn create_endpoint(
        &self,
        uri: &str,
    ) -> Result<Box<dyn Endpoint>, CamelError>;
}
Expand description

A Component is a factory for Endpoints.

Each component handles a specific URI scheme (e.g. “timer”, “log”, “direct”).

Required Methods§

Source

fn scheme(&self) -> &str

The URI scheme this component handles (e.g., “timer”, “log”).

Source

fn create_endpoint(&self, uri: &str) -> Result<Box<dyn Endpoint>, CamelError>

Create an endpoint from a URI string.

Implementors§