mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-16 12:45:04 +01:00
content frames
This commit is contained in:
parent
970fdbb9b5
commit
4cf7d7558b
7 changed files with 101 additions and 10 deletions
|
|
@ -6,5 +6,7 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bytes = "1.1.0"
|
||||
parking_lot = "0.12.0"
|
||||
smallvec = { version = "1.8.0", features = ["union"] }
|
||||
uuid = "0.8.2"
|
||||
|
|
|
|||
|
|
@ -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
23
amqp_core/src/message.rs
Normal 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,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue