pub struct Publish<S> { /* private fields */ }Expand description
Publish message
Implementations§
Source§impl<S> Publish<S>
impl<S> Publish<S>
pub fn retain(&self) -> bool
Sourcepub fn publish_topic(&self) -> &str
pub fn publish_topic(&self) -> &str
the information channel to which payload data is published.
Sourcepub fn session_mut(&mut self) -> &mut S
pub fn session_mut(&mut self) -> &mut S
returns mutable reference to a connection session
pub fn topic(&self) -> &Path<ByteString>
pub fn topic_mut(&mut self) -> &mut Path<ByteString>
pub fn query(&self) -> &str
pub fn packet(&self) -> &Publish
Sourcepub fn take_payload(&self) -> Bytes
pub fn take_payload(&self) -> Bytes
Extract Bytes from packet payload
Sourcepub fn json<T: DeserializeOwned>(&mut self) -> Result<T, JsonError>
pub fn json<T: DeserializeOwned>(&mut self) -> Result<T, JsonError>
Loads and parse application/json encoded body.
Trait Implementations§
Auto Trait Implementations§
impl<S> !Freeze for Publish<S>
impl<S> !RefUnwindSafe for Publish<S>
impl<S> !Send for Publish<S>
impl<S> !Sync for Publish<S>
impl<S> Unpin for Publish<S>
impl<S> !UnwindSafe for Publish<S>
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