egui_hooks 0.11.0

React Hooks like API for egui
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::any::Any;

pub trait Deps: Any + PartialEq + Send + Sync {
    fn partial_eq(&self, other: &BoxedDeps) -> bool;
}

impl<T: Any + PartialEq + Send + Sync> Deps for T {
    #[inline]
    fn partial_eq(&self, other: &BoxedDeps) -> bool {
        other.downcast_ref::<Self>() == Some(self)
    }
}

pub(crate) type BoxedDeps = Box<dyn Any + Send + Sync>;