stomp_rs/client/
interceptor.rs

1use crate::protocol::{ClientCommand, Frame, ServerCommand};
2use async_trait::async_trait;
3
4#[async_trait]
5pub trait ConnectionHook: Send + Sync {
6    async fn before_send(&self, _frame: &Frame<ClientCommand>) { }
7    async fn after_send(&self, _frame: &Frame<ClientCommand>) { }
8
9    async fn before_receive(&self, _frame: &Frame<ServerCommand>) { }
10    async fn after_receive(&self, _frame: &Frame<ServerCommand>) { }
11}