mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 19:55:03 +01:00
26 lines
514 B
Rust
26 lines
514 B
Rust
use std::sync::Arc;
|
|
|
|
use bytes::Bytes;
|
|
use tinyvec::TinyVec;
|
|
|
|
use crate::{connection::ContentHeader, newtype_id};
|
|
|
|
pub type Message = Arc<MessageInner>;
|
|
|
|
newtype_id!(pub MessageId);
|
|
|
|
#[derive(Debug)]
|
|
pub struct MessageInner {
|
|
pub id: MessageId,
|
|
pub header: ContentHeader,
|
|
pub routing: RoutingInformation,
|
|
pub content: TinyVec<[Bytes; 1]>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct RoutingInformation {
|
|
pub exchange: String,
|
|
pub routing_key: String,
|
|
pub mandatory: bool,
|
|
pub immediate: bool,
|
|
}
|