route topics

This commit is contained in:
nora 2022-03-20 18:31:41 +01:00
parent 58de7f1e2d
commit 43d0ce05dc
10 changed files with 98 additions and 49 deletions

View file

@ -1,9 +1,8 @@
use std::sync::Arc;
use bytes::Bytes;
use tinyvec::TinyVec;
use crate::{connection::ContentHeader, newtype_id};
use crate::{connection::ContentHeader, newtype_id, SingleVec};
pub type Message = Arc<MessageInner>;
@ -14,7 +13,7 @@ pub struct MessageInner {
pub id: MessageId,
pub header: ContentHeader,
pub routing: RoutingInformation,
pub content: TinyVec<[Bytes; 1]>,
pub content: SingleVec<Bytes>,
}
#[derive(Debug)]