action_macros.rs

 1use serde_derive::Deserialize;
 2
 3#[test]
 4fn test_derive() {
 5    use gpui2 as gpui;
 6
 7    #[derive(PartialEq, Clone, Deserialize, gpui2_macros::Action)]
 8    struct AnotherTestAction;
 9
10    #[gpui2_macros::register_action]
11    #[derive(PartialEq, Clone, gpui::serde_derive::Deserialize)]
12    struct RegisterableAction {}
13
14    impl gpui::Action for RegisterableAction {
15        fn boxed_clone(&self) -> Box<dyn gpui::Action> {
16            todo!()
17        }
18
19        fn as_any(&self) -> &dyn std::any::Any {
20            todo!()
21        }
22
23        fn partial_eq(&self, _action: &dyn gpui::Action) -> bool {
24            todo!()
25        }
26
27        fn name(&self) -> &str {
28            todo!()
29        }
30
31        fn debug_name() -> &'static str
32        where
33            Self: Sized,
34        {
35            todo!()
36        }
37
38        fn build(_value: serde_json::Value) -> anyhow::Result<Box<dyn gpui::Action>>
39        where
40            Self: Sized,
41        {
42            todo!()
43        }
44    }
45}