beet_flow/actions/
action_types.rs

1use bevy::prelude::*;
2use bevy::reflect::GetTypeRegistration;
3
4/// Minimal traits generally required for an action generic type.
5pub trait GenericActionType:
6	'static + Send + Sync + Default + Clone + FromReflect + GetTypeRegistration
7{
8}
9impl<
10		T: 'static
11			+ Send
12			+ Sync
13			+ Default
14			+ Clone
15			+ FromReflect
16			+ GetTypeRegistration,
17	> GenericActionType for T
18{
19}
20
21
22/// Minimal traits generally required for an action component.
23pub trait GenericActionComponent:
24	Clone + FromReflect + GetTypeRegistration + Component
25{
26}
27impl<T: Clone + FromReflect + GetTypeRegistration + Component>
28	GenericActionComponent for T
29{
30}
31/// Minimal traits generally required for an action event.
32pub trait GenericActionEvent:
33	Clone + FromReflect + GetTypeRegistration + Event
34{
35}
36impl<T: Clone + FromReflect + GetTypeRegistration + Event> GenericActionEvent
37	for T
38{
39}
40pub trait ReflectEvent: Event + FromReflect + GetTypeRegistration {}
41impl<T: Event + FromReflect + GetTypeRegistration> ReflectEvent for T {}
42
43/// Minimal traits generally required for an action asset type.
44pub trait GenericActionAsset: 'static + Send + Sync + TypePath + Asset {}
45impl<T: 'static + Send + Sync + TypePath + Asset> GenericActionAsset for T {}