//! Batch message types. use tokio::sync::{oneshot, OwnedSemaphorePermit}; use super::error::ServiceError; /// Message sent to the batch worker #[derive(Debug)] pub(crate) struct Message { pub(crate) request: Request, pub(crate) tx: Tx, pub(crate) span: tracing::Span, pub(super) _permit: OwnedSemaphorePermit, } /// Response sender pub(crate) type Tx = oneshot::Sender>; /// Response receiver pub(crate) type Rx = oneshot::Receiver>;