ferroui_base/rendering/composition/generated/
composition_cache_mode.rs1use crate::rendering::composition::ICompositionObjectHost;
8use crate::rendering::composition::server::IServerAnimatedPropertyHost;
9use crate::rendering::composition::transport::BatchStreamReader;
10use crate::rendering::composition::transport::BatchStreamWriter;
11use std::any::Any;
12use std::any::TypeId;
13use std::time::Duration;
14
15pub trait CompositionCacheModeHooks: ICompositionObjectHost {
18 fn initialize_defaults_extra(&self) {}
19}
20
21pub struct CompositionCacheModeProps {
23}
24
25impl Default for CompositionCacheModeProps {
26 fn default() -> Self {
27 Self::new()
28 }
29}
30
31impl CompositionCacheModeProps {
32 pub fn new() -> Self {
36 Self {
37 }
38 }
39
40 pub fn initialize_defaults(&self, host: &dyn CompositionCacheModeHooks) {
43 self.initialize_own_defaults(host);
44 }
45
46 pub fn initialize_own_defaults(&self, host: &dyn CompositionCacheModeHooks) {
48 CompositionCacheModeHooks::initialize_defaults_extra(host);
49 }
50
51 pub fn serialize_changes_core(&self, _host: &dyn CompositionCacheModeHooks, _writer: &mut BatchStreamWriter<'_>) {
54 }
55}
56
57pub trait ServerCompositionCacheModeHooks: IServerAnimatedPropertyHost {
60}
61
62pub struct ServerCompositionCacheModeProps {
64}
65
66impl Default for ServerCompositionCacheModeProps {
67 fn default() -> Self {
68 Self::new()
69 }
70}
71
72impl ServerCompositionCacheModeProps {
73 pub fn new() -> Self {
76 Self {
77 }
78 }
79
80 pub fn find_props(&self, type_id: TypeId) -> Option<&dyn Any> {
83 if type_id == TypeId::of::<Self>() {
84 return Some(self);
85 }
86 None
87 }
88
89 pub fn deserialize_changes_core(
92 &self,
93 _host: &dyn ServerCompositionCacheModeHooks,
94 _reader: &mut BatchStreamReader<'_>,
95 _committed_at: Duration,
96 ) {
97 }
98}