Struct 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§

Source§

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>,

Source

pub fn new( requests: FrameConsumer<'a, L>, outgoing_timer: O, options: MqttOptions<'b>, ) -> Self

Source

pub fn connect<N: Dns + TcpClientStack<TcpSocket = S> + ?Sized>( &mut self, network: &mut N, ) -> Result<bool, EventError>

Source

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.

Source

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> Freeze for EventLoop<'a, 'b, S, O, TIMER_HZ, L>
where O: Freeze, S: Freeze,

§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.