Trait Toggle

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

Required Methods§

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", so this trait is not object safe.

Implementations on Foreign Types§

§

impl Toggle for bool

§

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

§

impl Toggle for AtomicBool

§

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

§

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

§

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

Implementors§

§

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

§

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

§

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

§

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,

§

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,

§

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,

§

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,

§

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,

§

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

§

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