Struct ntex_mqtt::v5::Publish [−][src]
pub struct Publish { /* fields omitted */ }
Expand description
Publish message
Implementations
impl Publish
[src]
impl Publish
[src]pub fn retain(&self) -> bool
[src]
pub fn publish_topic(&self) -> &str
[src]
pub fn publish_topic(&self) -> &str
[src]the information channel to which payload data is published.
pub fn id(&self) -> Option<NonZeroU16>
[src]
pub fn id(&self) -> Option<NonZeroU16>
[src]only present in PUBLISH Packets where the QoS level is 1 or 2.
pub fn topic(&self) -> &Path<ByteString>
[src]
pub fn topic_mut(&mut self) -> &mut Path<ByteString>
[src]
pub fn packet(&self) -> &Publish
[src]
pub fn packet_mut(&mut self) -> &mut Publish
[src]
pub fn take_payload(&self) -> Bytes
[src]
pub fn take_payload(&self) -> Bytes
[src]Extract Bytes from packet payload
pub fn json<T: DeserializeOwned>(&mut self) -> Result<T, JsonError>
[src]
pub fn json<T: DeserializeOwned>(&mut self) -> Result<T, JsonError>
[src]Loads and parse application/json
encoded body.
pub fn ack(self) -> PublishAck
[src]
pub fn ack(self) -> PublishAck
[src]Create acknowledgement for this packet
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Publish
impl Send for Publish
impl Sync for Publish
impl Unpin for Publish
impl UnwindSafe for Publish
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self