Struct mqttrust_core::EventLoop [−][src]
pub struct EventLoop<'a, 'b, S, O, const L: usize> where
O: Clock, {
pub state: MqttState<Instant<O>>,
pub last_outgoing_timer: O,
pub options: MqttOptions<'b>,
pub requests: FrameConsumer<'a, L>,
// some fields omitted
}
Fields
state: MqttState<Instant<O>>
Current state of the connection
last_outgoing_timer: O
Last outgoing packet time
options: MqttOptions<'b>
Options of the current mqtt connection
requests: FrameConsumer<'a, L>
Request stream
Implementations
pub fn new(
requests: FrameConsumer<'a, 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
.