Skip to main content

Toggle

Trait Toggle 

Source
pub trait Toggle:
    Send
    + Sync
    + 'static {
    // Required method
    fn status(&self) -> impl Future<Output = bool> + Send + '_;
}

Required Methods§

Source

fn status(&self) -> impl Future<Output = bool> + Send + '_

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Toggle for AtomicBool

Source§

fn status(&self) -> impl Future<Output = bool> + Send + '_

Source§

impl Toggle for bool

Source§

fn status(&self) -> impl Future<Output = Self> + Send + '_

Source§

impl<T: Toggle> Toggle for Arc<T>

Source§

fn status(&self) -> impl Future<Output = bool> + Send + '_

Source§

impl<T: Toggle> Toggle for Option<T>

Source§

async fn status(&self) -> bool

Implementors§

Source§

impl<A, B, C, D, E, F, G, H, I> Toggle for Either9<A, B, C, D, E, F, G, H, I>
where A: Toggle, B: Toggle, C: Toggle, D: Toggle, E: Toggle, F: Toggle, G: Toggle, H: Toggle, I: Toggle,

Source§

impl<A, B, C, D, E, F, G, H> Toggle for Either8<A, B, C, D, E, F, G, H>
where A: Toggle, B: Toggle, C: Toggle, D: Toggle, E: Toggle, F: Toggle, G: Toggle, H: Toggle,

Source§

impl<A, B, C, D, E, F, G> Toggle for Either7<A, B, C, D, E, F, G>
where A: Toggle, B: Toggle, C: Toggle, D: Toggle, E: Toggle, F: Toggle, G: Toggle,

Source§

impl<A, B, C, D, E, F> Toggle for Either6<A, B, C, D, E, F>
where A: Toggle, B: Toggle, C: Toggle, D: Toggle, E: Toggle, F: Toggle,

Source§

impl<A, B, C, D, E> Toggle for Either5<A, B, C, D, E>
where A: Toggle, B: Toggle, C: Toggle, D: Toggle, E: Toggle,

Source§

impl<A, B, C, D> Toggle for Either4<A, B, C, D>
where A: Toggle, B: Toggle, C: Toggle, D: Toggle,

Source§

impl<A, B, C> Toggle for Either3<A, B, C>
where A: Toggle, B: Toggle, C: Toggle,

Source§

impl<A, B> Toggle for Either<A, B>
where A: Toggle, B: Toggle,

Source§

impl<F, Fut> Toggle for F
where F: Fn() -> Fut + Send + Sync + 'static, Fut: Future<Output: Toggle> + Send + 'static,