pub struct Message {
pub topic: TopicPath,
pub qos: QoS,
pub retain: bool,
pub pid: Option<PacketIdentifier>,
pub payload: Arc<Vec<u8>>,
}
Fields§
§topic: TopicPath
§qos: QoS
§retain: bool
§pid: Option<PacketIdentifier>
§payload: Arc<Vec<u8>>
Implementations§
Source§impl Message
impl Message
pub fn from_pub(publish: Box<Publish>) -> Result<Box<Message>>
pub fn from_last_will(last_will: LastWill) -> Box<Message>
pub fn to_pub(&self, qos: Option<QoS>, dup: bool) -> Box<Publish>
pub fn transform( &self, pid: Option<PacketIdentifier>, qos: Option<QoS>, ) -> Box<Message>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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