pub struct DirectConfig {
pub name: String,
pub timeout_ms: Option<u64>,
pub fail_if_no_consumers: Option<bool>,
}Expand description
Configuration for Direct endpoints parsed from URIs.
URI format: direct:name[?timeout_ms=30000]
Example: direct:foo creates an endpoint named “foo”
Fields§
§name: StringEndpoint name (path portion).
timeout_ms: Option<u64>Timeout in milliseconds for producer call(). Defaults to 30 000 ms.
fail_if_no_consumers: Option<bool>When false, skip readiness error if no consumer registered.
Implementations§
Source§impl DirectConfig
impl DirectConfig
Sourcepub fn parse_uri_components(parts: UriComponents) -> Result<Self, CamelError>
pub fn parse_uri_components(parts: UriComponents) -> Result<Self, CamelError>
Parse URI components into this config.
Call this from your custom UriConfig::from_components implementation.
Sourcepub fn uri_options() -> Vec<UriOption>
pub fn uri_options() -> Vec<UriOption>
Generated URI option definitions, one per #[uri_param] field.
The path field is excluded.
Sourcepub fn metadata() -> ComponentMetadata
pub fn metadata() -> ComponentMetadata
Generated ComponentMetadata, built from the
#[uri_config(metadata(..))] attribute plus the derived
uri_options().
Source§impl DirectConfig
impl DirectConfig
pub fn from_uri(uri: &str) -> Result<Self, CamelError>
Trait Implementations§
Source§impl Clone for DirectConfig
impl Clone for DirectConfig
Source§fn clone(&self) -> DirectConfig
fn clone(&self) -> DirectConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DirectConfig
impl RefUnwindSafe for DirectConfig
impl Send for DirectConfig
impl Sync for DirectConfig
impl Unpin for DirectConfig
impl UnsafeUnpin for DirectConfig
impl UnwindSafe for DirectConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more