pub struct RustRabbit { /* private fields */ }Expand description
Main facade for the rust-rabbit library
Implementations§
Source§impl RustRabbit
impl RustRabbit
Sourcepub async fn new(config: RabbitConfig) -> Result<Self>
pub async fn new(config: RabbitConfig) -> Result<Self>
Create a new RustRabbit instance with the given configuration
Sourcepub async fn with_metrics(
config: RabbitConfig,
metrics: RustRabbitMetrics,
) -> Result<Self>
pub async fn with_metrics( config: RabbitConfig, metrics: RustRabbitMetrics, ) -> Result<Self>
Create a new RustRabbit instance with metrics enabled
Sourcepub async fn consumer(&self, options: ConsumerOptions) -> Result<Consumer>
pub async fn consumer(&self, options: ConsumerOptions) -> Result<Consumer>
Create a consumer with the given options
Sourcepub fn health_checker(&self) -> HealthChecker
pub fn health_checker(&self) -> HealthChecker
Get the health checker
Sourcepub fn metrics(&self) -> Option<&RustRabbitMetrics>
pub fn metrics(&self) -> Option<&RustRabbitMetrics>
Get the metrics instance if enabled
Sourcepub async fn create_batcher(
&self,
config: BatchConfig,
) -> Result<MessageBatcher>
pub async fn create_batcher( &self, config: BatchConfig, ) -> Result<MessageBatcher>
Create a message batcher for high-throughput publishing
Sourcepub fn enable_shutdown_handling(
&mut self,
config: ShutdownConfig,
) -> Arc<ShutdownManager>
pub fn enable_shutdown_handling( &mut self, config: ShutdownConfig, ) -> Arc<ShutdownManager>
Enable graceful shutdown handling
Sourcepub fn shutdown_manager(&self) -> Option<Arc<ShutdownManager>>
pub fn shutdown_manager(&self) -> Option<Arc<ShutdownManager>>
Get the shutdown manager if enabled
Auto Trait Implementations§
impl Freeze for RustRabbit
impl !RefUnwindSafe for RustRabbit
impl Send for RustRabbit
impl Sync for RustRabbit
impl Unpin for RustRabbit
impl !UnwindSafe for RustRabbit
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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