pub trait BeanProcessor: Send + Sync {
// Required methods
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
exchange: &'life2 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn methods(&self) -> Vec<String>;
// Provided methods
fn method_params(&self) -> Option<Vec<String>> { ... }
fn on_start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn on_stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
Sourcefn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
exchange: &'life2 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
method: &'life1 str,
exchange: &'life2 mut Exchange,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Invoke a named method on this bean, mutating the exchange in place.
The method parameter selects the target method by name. When a bean
exposes multiple methods with the same name (overloads), callers may
supply method_params to disambiguate.
Provided Methods§
Sourcefn method_params(&self) -> Option<Vec<String>>
fn method_params(&self) -> Option<Vec<String>>
Optional parameter-type hints for overload resolution.
When Some, the vector contains fully-qualified type names (e.g.
"String", "i32") that identify which overload of a method to invoke.
TODO: Full overload resolution (matching by parameter types at runtime) is not yet implemented. Currently only method-name dispatch is supported.
fn on_start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CamelError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".