ravel 0.2.0

An experimental approach to UI in Rust with a focus on ergonomics, efficiency, and simplicity.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::any::Any;

/// Trait for upcasting to [`Any`], implemented automatically.
///
/// This is a workaround until `trait_upcasting` is stabilized.
pub trait AsAny: Any {
    fn as_mut_dyn_any(&mut self) -> &mut dyn Any;
}

impl<T: Any> AsAny for T {
    fn as_mut_dyn_any(&mut self) -> &mut dyn Any {
        self
    }
}