pub struct TcpConnectionState<'a, 'l, M: RawMutex, NETWORK, DNS, const BUFFER_SIZE: usize>where
NETWORK: TcpConnect,
DNS: Dns,{ /* private fields */ }Implementations§
Source§impl<'a, 'l, M: RawMutex, NETWORK, DNS, const BUFFER_SIZE: usize> TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>where
NETWORK: TcpConnect,
DNS: Dns,
impl<'a, 'l, M: RawMutex, NETWORK, DNS, const BUFFER_SIZE: usize> TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>where
NETWORK: TcpConnect,
DNS: Dns,
pub fn new( network: &'a NETWORK, dns: DNS, last_will: Option<LastWill<'l>>, config: ClientConfig<'l>, ) -> Self
Trait Implementations§
Source§impl<'a, 'l, M: RawMutex, NETWORK, DNS, const BUFFER_SIZE: usize> ConnectionState for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>where
NETWORK: TcpConnect,
DNS: Dns,
impl<'a, 'l, M: RawMutex, NETWORK, DNS, const BUFFER_SIZE: usize> ConnectionState for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>where
NETWORK: TcpConnect,
DNS: Dns,
fn get_state(&self) -> Option<ConnectionStateValue>
async fn on_state_change(&self) -> ConnectionStateValue
async fn disconnect(&self) -> Result<(), MqttError>
async fn await_connected(&self)
fn set_error(&self)
Source§fn try_write_packet(&self, packet: &Packet<'_>) -> Result<bool, MqttError>
fn try_write_packet(&self, packet: &Packet<'_>) -> Result<bool, MqttError>
Send a mqtt packet to the broker
This method may return without sending the packet returning Ok(false). This indicates that the send sould be tried later.
Source§async fn write_packet(&self, packet: &Packet<'_>) -> Result<(), MqttError>
async fn write_packet(&self, packet: &Packet<'_>) -> Result<(), MqttError>
Writes a packet to the send buffer and sends data until teh packet fits
Auto Trait Implementations§
impl<'a, 'l, M, NETWORK, DNS, const BUFFER_SIZE: usize> !Freeze for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>
impl<'a, 'l, M, NETWORK, DNS, const BUFFER_SIZE: usize> !RefUnwindSafe for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>
impl<'a, 'l, M, NETWORK, DNS, const BUFFER_SIZE: usize> Send for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>
impl<'a, 'l, M, NETWORK, DNS, const BUFFER_SIZE: usize> !Sync for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>
impl<'a, 'l, M, NETWORK, DNS, const BUFFER_SIZE: usize> Unpin for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>
impl<'a, 'l, M, NETWORK, DNS, const BUFFER_SIZE: usize> UnwindSafe for TcpConnectionState<'a, 'l, M, NETWORK, DNS, BUFFER_SIZE>where
DNS: UnwindSafe,
NETWORK: RefUnwindSafe,
M: UnwindSafe,
<NETWORK as TcpConnect>::Connection<'a>: UnwindSafe,
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