pub struct PublishRaw {
pub header: BytesMut,
pub payload: Bytes,
pub qos: QoS,
pub pkid: u16,
}Expand description
Raw publish is used to perform serialization in current thread rather the eventloop.
Fields§
§header: BytesMut§payload: Bytes§qos: QoS§pkid: u16Implementations§
Source§impl PublishRaw
impl PublishRaw
pub fn from_publish(publish: Publish) -> Result<PublishRaw, Error>
pub fn set_pkid(&mut self, pkid: u16) -> &mut Self
pub fn set_retain(&mut self, retain: bool) -> &mut Self
pub fn set_dup(&mut self, dup: bool) -> &mut Self
pub fn write(&self, payload: &mut BytesMut) -> Result<usize, Error>
Trait Implementations§
Source§impl Clone for PublishRaw
impl Clone for PublishRaw
Source§fn clone(&self) -> PublishRaw
fn clone(&self) -> PublishRaw
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PublishRaw
impl Debug for PublishRaw
Source§impl PartialEq for PublishRaw
impl PartialEq for PublishRaw
impl StructuralPartialEq for PublishRaw
Auto Trait Implementations§
impl !Freeze for PublishRaw
impl RefUnwindSafe for PublishRaw
impl Send for PublishRaw
impl Sync for PublishRaw
impl Unpin for PublishRaw
impl UnwindSafe for PublishRaw
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