pub struct StartupReceiver { /* private fields */ }Expand description
Receiver half of the consumer startup handshake. Resolves once the
consumer calls ConsumerContext::mark_ready (Ok) or its start()
returns an Err first (Err).
For ConsumerStartupMode::Immediate consumers the receiver is
pre-resolved at construction time (see StartupReceiver::immediate).
Implementations§
Source§impl StartupReceiver
impl StartupReceiver
Sourcepub fn immediate() -> Self
pub fn immediate() -> Self
Construct a receiver that is already resolved as Ok. Used for
ConsumerStartupMode::Immediate consumers so the controller can
uniformly await every receiver without changing behaviour.
Sourcepub async fn await_ready(self) -> Result<(), CamelError>
pub async fn await_ready(self) -> Result<(), CamelError>
Wait for the consumer to become ready or fail. Resolves:
Ok(())if the consumer signalled readiness.Err(CamelError::RouteError(_))if the consumer’sstart()returned an error before signalling readiness.Err(CamelError::RouteError(_))if the signal sender was dropped without either transition (programming-contract violation).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StartupReceiver
impl !UnwindSafe for StartupReceiver
impl Freeze for StartupReceiver
impl Send for StartupReceiver
impl Sync for StartupReceiver
impl Unpin for StartupReceiver
impl UnsafeUnpin for StartupReceiver
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