pub struct ClientNoQueue<'a, C, D, F, const P: usize>{ /* private fields */ }Implementations§
Source§impl<'a, C, D, F, const P: usize> ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> ClientNoQueue<'a, C, D, F, P>
Trait Implementations§
Source§impl<'a, C, D, F, const P: usize> Client<'a> for ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> Client<'a> for ClientNoQueue<'a, C, D, F, P>
Source§async fn connect_with_will<const W: usize>(
&mut self,
settings: &ConnectionSettings<'_>,
will: Option<Will<'_, W>>,
) -> Result<(), ClientError>
async fn connect_with_will<const W: usize>( &mut self, settings: &ConnectionSettings<'_>, will: Option<Will<'_, W>>, ) -> Result<(), ClientError>
Connect to server with a will
Source§async fn connect(
&mut self,
settings: &ConnectionSettings<'_>,
) -> Result<(), ClientError>
async fn connect( &mut self, settings: &ConnectionSettings<'_>, ) -> Result<(), ClientError>
Connect to server
Source§async fn disconnect(&mut self) -> Result<(), ClientError>
async fn disconnect(&mut self) -> Result<(), ClientError>
Disconnect from server
Source§async fn publish_with_properties<'b, const PP: usize>(
&'b mut self,
topic_name: &'b str,
payload: &'b [u8],
qos: QualityOfService,
retain: bool,
properties: Vec<PublishProperty<'b>, PP>,
) -> Result<(), ClientError>
async fn publish_with_properties<'b, const PP: usize>( &'b mut self, topic_name: &'b str, payload: &'b [u8], qos: QualityOfService, retain: bool, properties: Vec<PublishProperty<'b>, PP>, ) -> Result<(), ClientError>
Publish a message with given payload to a given topic, with properties
Source§async fn subscribe<'b>(
&'b mut self,
topic_name: &'b str,
maximum_qos: QualityOfService,
) -> Result<(), ClientError>
async fn subscribe<'b>( &'b mut self, topic_name: &'b str, maximum_qos: QualityOfService, ) -> Result<(), ClientError>
Subscribe to a topic
Source§async fn unsubscribe<'b>(
&'b mut self,
topic_name: &'b str,
) -> Result<(), ClientError>
async fn unsubscribe<'b>( &'b mut self, topic_name: &'b str, ) -> Result<(), ClientError>
Unsubscribe from a topic
Source§async fn poll(&mut self, wait: bool) -> Result<bool, ClientError>
async fn poll(&mut self, wait: bool) -> Result<bool, ClientError>
Poll for and handle at most one event
This updates the state of the client, and calls the event_handler if
a message is received
If wait is true, this will wait until an event is received, or the comms
are disconnected. Otherwise an event will only be waited for if at least one
byte of data is already available, indicating a packet should be available
soon.
On success, returns true if an event was handled, false if none was received
Errors indicate an invalid packet was received, message_target errored,
the received packet was unexpected based on our state, or the comms are
disconnected.
Source§async fn perform<'b, const PP: usize>(
&'b mut self,
action: ClientAction<'b, PP>,
) -> Result<(), ClientError>
async fn perform<'b, const PP: usize>( &'b mut self, action: ClientAction<'b, PP>, ) -> Result<(), ClientError>
Perform an action (this replicates the functionality of
Client::subscribe, Client::unsubscribe and Client::publish)
but using an enum to represent the action.
Source§async fn publish<'b>(
&'b mut self,
topic_name: &'b str,
payload: &'b [u8],
qos: QualityOfService,
retain: bool,
) -> Result<(), ClientError>
async fn publish<'b>( &'b mut self, topic_name: &'b str, payload: &'b [u8], qos: QualityOfService, retain: bool, ) -> Result<(), ClientError>
Publish a message with given payload to a given topic, with no properties
Auto Trait Implementations§
impl<'a, C, D, F, const P: usize> Freeze for ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> RefUnwindSafe for ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> Send for ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> Sync for ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> Unpin for ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> UnsafeUnpin for ClientNoQueue<'a, C, D, F, P>
impl<'a, C, D, F, const P: usize> !UnwindSafe for ClientNoQueue<'a, C, D, F, P>
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