content frames

This commit is contained in:
nora 2022-02-10 02:50:53 +01:00
parent 970fdbb9b5
commit 4cf7d7558b
7 changed files with 101 additions and 10 deletions

View file

@ -1,5 +1,6 @@
#![warn(rust_2018_idioms)]
mod message;
pub mod methods;
use parking_lot::Mutex;

23
amqp_core/src/message.rs Normal file
View file

@ -0,0 +1,23 @@
#![allow(dead_code)]
use crate::methods;
use bytes::Bytes;
use smallvec::SmallVec;
use std::sync::Arc;
use uuid::Uuid;
pub type Message = Arc<RawMessage>;
pub struct RawMessage {
id: Uuid,
properties: methods::Table,
routing: RoutingInformation,
content: SmallVec<[Bytes; 1]>,
}
pub struct RoutingInformation {
pub exchange: String,
pub routing_key: String,
pub mandatory: bool,
pub immediate: bool,
}