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
sourceimpl<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> EventLoop<'a, 'b, S, O, TIMER_HZ, L> where
O: Timer<TIMER_HZ>,
impl<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> EventLoop<'a, 'b, S, O, TIMER_HZ, L> where
O: Timer<TIMER_HZ>,
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>
sourcepub 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
.
pub fn disconnect<N: TcpClientStack<TcpSocket = S> + ?Sized>(
&mut self,
network: &mut N
)
Auto Trait Implementations
impl<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> !RefUnwindSafe for EventLoop<'a, 'b, S, O, TIMER_HZ, L>
impl<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> Send for EventLoop<'a, 'b, S, O, TIMER_HZ, L> where
O: Send,
S: Send,
impl<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> !Sync for EventLoop<'a, 'b, S, O, TIMER_HZ, L>
impl<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> Unpin for EventLoop<'a, 'b, S, O, TIMER_HZ, L> where
O: Unpin,
S: Unpin,
impl<'a, 'b, S, O, const TIMER_HZ: u32, const L: usize> !UnwindSafe for EventLoop<'a, 'b, S, O, TIMER_HZ, L>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more