Struct simple_pub_sub::message::Msg
source · pub struct Msg {
pub header: Header,
pub topic: String,
pub message: Vec<u8>,
pub channel: Option<Sender<Msg>>,
pub client_id: Option<String>,
}Expand description
structure containing the complete information about a message.
Fields§
§header: HeaderHeader: the header of the message.
topic: StringThe topic for the message.
message: Vec<u8>the actual message, bytes.
channel: Option<Sender<Msg>>tokio::broadcast::sync::Sender the channel for passing the messages across.
client_id: Option<String>client_id: to identify each socket connection/client.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Msg
impl Send for Msg
impl Sync for Msg
impl Unpin for Msg
impl !UnwindSafe for Msg
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more