bevy_reflect 0.18.1

Dynamically interact with rust types
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use bevy_reflect_derive::impl_reflect_opaque;

impl_reflect_opaque!(::bevy_platform::time::Instant(
    Clone, Debug, Hash, PartialEq
));

#[cfg(test)]
mod tests {
    use crate::FromReflect;
    use bevy_platform::time::Instant;

    #[test]
    fn instant_should_from_reflect() {
        let expected = Instant::now();
        let output = Instant::from_reflect(&expected).unwrap();
        assert_eq!(expected, output);
    }
}