pub struct Publish {
pub qos: QoS,
pub pkid: u16,
pub topic: String,
pub payload: Bytes,
pub dup: bool,
pub retain: bool,
}
Expand description
Publish packet
Fields§
§qos: QoS
§pkid: u16
§topic: String
§payload: Bytes
§dup: bool
§retain: bool
Implementations§
Source§impl Publish
impl Publish
pub fn new<S: Into<String>, P: Into<Vec<u8>>>( topic: S, qos: QoS, payload: P, ) -> Publish
pub fn raw(self) -> Result<PublishRaw, Error>
pub fn from_bytes<S: Into<String>>( topic: S, qos: QoS, payload: Bytes, ) -> Publish
pub fn write(&self, buffer: &mut BytesMut) -> Result<usize, Error>
Trait Implementations§
impl StructuralPartialEq for Publish
Auto Trait Implementations§
impl !Freeze for Publish
impl RefUnwindSafe for Publish
impl Send for Publish
impl Sync for Publish
impl Unpin for Publish
impl UnwindSafe for Publish
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