[−][src]Struct paho_mqtt::topic::Topic
A topic destination for messages. This keeps message parameters for repeatedly publishing to the same topic on a server.
Methods
impl<'a> Topic<'a>
[src]
pub fn new<T>(cli: &'a AsyncClient, topic: T, qos: i32) -> Topic<'a> where
T: Into<String>,
[src]
T: Into<String>,
Creates a new topic object for publishing messages.
Arguments
cli
The client used to publish the messages.
topic
The topic on which to publish the messages
qos
The quality of service for messages
pub fn new_retained<T>(cli: &'a AsyncClient, topic: T, qos: i32) -> Topic<'a> where
T: Into<String>,
[src]
T: Into<String>,
Creates a new topic object for publishing messages.
Arguments
cli
The client used to publish the messages.
topic
The topic on which to publish the messages
qos
The quality of service for messages
pub fn subscribe(&self) -> Token
[src]
Subscribe to the topic.
pub fn subscribe_with_options<T>(&self, opts: T) -> Token where
T: Into<SubscribeOptions>,
[src]
T: Into<SubscribeOptions>,
Subscribe to the topic with subscription options.
pub fn publish<V>(&self, payload: V) -> DeliveryToken where
V: Into<Vec<u8>>,
[src]
V: Into<Vec<u8>>,
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Topic<'a>
impl<'a> Send for Topic<'a>
impl<'a> Sync for Topic<'a>
impl<'a> Unpin for Topic<'a>
impl<'a> !UnwindSafe for Topic<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,