pub struct MessagePipeline { /* private fields */ }Expand description
Message processing pipeline
Implementations§
Source§impl MessagePipeline
impl MessagePipeline
Sourcepub async fn process(
&self,
message: Message,
context: Arc<RwLock<Context>>,
) -> Result<Response>
pub async fn process( &self, message: Message, context: Arc<RwLock<Context>>, ) -> Result<Response>
Sourcepub fn add_stage(&mut self, stage: Box<dyn PipelineStage>)
pub fn add_stage(&mut self, stage: Box<dyn PipelineStage>)
Add a custom stage to the pipeline
Sourcepub fn add_middleware(&mut self, middleware: Box<dyn PipelineMiddleware>)
pub fn add_middleware(&mut self, middleware: Box<dyn PipelineMiddleware>)
Add middleware to the pipeline
Sourcepub fn metrics(&self) -> &PipelineMetrics
pub fn metrics(&self) -> &PipelineMetrics
Get pipeline metrics
Auto Trait Implementations§
impl Freeze for MessagePipeline
impl !RefUnwindSafe for MessagePipeline
impl Send for MessagePipeline
impl Sync for MessagePipeline
impl Unpin for MessagePipeline
impl !UnwindSafe for MessagePipeline
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