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§
Sourcefn create_endpoint(&self, uri: &str) -> Result<Box<dyn Endpoint>, CamelError>
fn create_endpoint(&self, uri: &str) -> Result<Box<dyn Endpoint>, CamelError>
Create an endpoint from a URI string.