#[non_exhaustive]pub struct Message<'a> {
pub topic: &'a str,
pub payload: &'a [u8],
pub retain: Option<bool>,
}Expand description
A message received from the broker, borrowed from the client’s buffer.
Built with Message::new outside this crate.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.topic: &'a strTopic name the message was published to.
payload: &'a [u8]Application payload, possibly empty.
retain: Option<bool>MQTT retain bit; None when the client does not surface it.
Implementations§
Trait Implementations§
impl<'a> Copy for Message<'a>
impl<'a> Eq for Message<'a>
impl<'a> StructuralPartialEq for Message<'a>
Auto Trait Implementations§
impl<'a> Freeze for Message<'a>
impl<'a> RefUnwindSafe for Message<'a>
impl<'a> Send for Message<'a>
impl<'a> Sync for Message<'a>
impl<'a> Unpin for Message<'a>
impl<'a> UnsafeUnpin for Message<'a>
impl<'a> UnwindSafe for Message<'a>
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