Struct mqttrust_core::EventLoop [−][src]
pub struct EventLoop<'a, 'b, S, O, const T: usize, const P: usize, const L: usize> where
O: Clock, { pub state: MqttState<Instant<O>, T, P>, pub last_outgoing_timer: O, pub options: MqttOptions<'b>, pub requests: Consumer<'a, OwnedRequest<T, P>, L>, // some fields omitted }
Fields
state: MqttState<Instant<O>, T, P>
Current state of the connection
last_outgoing_timer: O
Last outgoing packet time
options: MqttOptions<'b>
Options of the current mqtt connection
requests: Consumer<'a, OwnedRequest<T, P>, L>
Request stream
Implementations
pub fn new(
requests: Consumer<'a, OwnedRequest<T, P>, L>,
outgoing_timer: O,
options: MqttOptions<'b>
) -> Self
pub fn connect<N: Dns + TcpClientStack<TcpSocket = S>>(
&mut self,
network: &mut N
) -> Result<bool, EventError>
pub fn yield_event<N: TcpClientStack<TcpSocket = S>>(
&mut self,
network: &mut N
) -> Result<Notification, Infallible>
pub fn yield_event<N: TcpClientStack<TcpSocket = S>>(
&mut self,
network: &mut N
) -> Result<Notification, Infallible>
Yields notification from events. All the error raised while processing
event is reported as an Ok
value of Notification::Abort
.
Auto Trait Implementations
impl<'a, 'b, S, O, const T: usize, const P: usize, const L: usize> Send for EventLoop<'a, 'b, S, O, T, P, L> where
O: Send,
S: Send,
<O as Clock>::T: Send,