openthread::ot

Trait TaskletsStreamExt

Source
pub trait TaskletsStreamExt {
    // Required method
    fn tasklets_poll(&self, cx: &mut Context<'_>) -> Poll<Option<()>>;

    // Provided method
    fn tasklets_stream(&self) -> TaskletsStream<'_, Self> { ... }
}
Expand description

Trait used to wrap around a mutex that polls internally without needing to externally unlock the mutex.

Required Methods§

Source

fn tasklets_poll(&self, cx: &mut Context<'_>) -> Poll<Option<()>>

Method which polls the tasklets for processing updates.

Provided Methods§

Source

fn tasklets_stream(&self) -> TaskletsStream<'_, Self>

Returns an asynchronous stream which can be used for processing tasklets.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: AsRef<Instance>> TaskletsStreamExt for Mutex<T>

Source§

fn tasklets_poll(&self, cx: &mut Context<'_>) -> Poll<Option<()>>

Source§

impl<T: AsRef<Instance>> TaskletsStreamExt for Mutex<T>

Source§

fn tasklets_poll(&self, cx: &mut Context<'_>) -> Poll<Option<()>>

Implementors§