Struct mqttrust_core::EventLoop
source · [−]pub struct EventLoop<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> where
O: Timer<TIMER_HZ>, {
pub options: MqttOptions<'b>,
/* private fields */
}
Fields
options: MqttOptions<'b>
Options of the current mqtt connection
Implementations
pub fn new(
requests: FrameConsumer<'a, L>,
outgoing_timer: O,
options: MqttOptions<'b>
) -> Self
pub fn connect<N: Dns + TcpClientStack<TcpSocket = S> + ?Sized>(
&mut self,
network: &mut N
) -> Result<bool, EventError>
pub fn yield_event<N: TcpClientStack<TcpSocket = S> + ?Sized>(
&mut self,
network: &mut N
) -> Result<Notification, Infallible>
pub fn yield_event<N: TcpClientStack<TcpSocket = S> + ?Sized>(
&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
.