Skip to main content

Component

Trait Component 

Source
pub trait Component: Send + Sync {
    // Required methods
    fn scheme(&self) -> &str;
    fn create_endpoint<'life0, 'life1, 'async_trait>(
        &'life0 self,
        uri: &'life1 CamelUri,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Endpoint>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn scheme(&self) -> &str

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

Source

fn create_endpoint<'life0, 'life1, 'async_trait>( &'life0 self, uri: &'life1 CamelUri, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Endpoint>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Build (or look up) an endpoint from a parsed URI.

Implementors§