Wow!
parent: tbd commit: 6530104
1 | use ; |
2 | use |
3 | , | OperationError
4 | , |
5 | , | ObjectBackend
6 | , |
7 | ; |
8 | use Debug; |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | pub vtable: &'static , |
17 | |
18 | |
19 | |
20 | |
21 | async |
22 | &self, |
23 | object: O, |
24 | operation: &str, |
25 | payload: D, |
26 | operation_state: &OperationState, |
27 | |
28 | |
29 | O: GiteratedObject + Debug + 'static, |
30 | D: + Debug + 'static, |
31 | : Clone, | Success
32 | : Clone, | Failure
33 | |
34 | todo! |
35 | |
36 | |
37 | async |
38 | &self, |
39 | object_str: &str, |
40 | operation_state: &OperationState, |
41 | |
42 | todo! |
43 | |
44 | |
45 | |
46 | // impl RuntimeState { |
47 | // pub unsafe fn from_static() -> Self { |
48 | // let runtime = giterated_static_runtime::get_runtime_reference(); |
49 | |
50 | // let runtime = runtime.cast::<Box<Runtime>>().as_ref(); |
51 | |
52 | // runtime.state() |
53 | // } |
54 | |
55 | // pub unsafe fn runtime_state() -> PluginState { |
56 | // let runtime = giterated_static_runtime::get_runtime_reference(); |
57 | |
58 | // PluginState::from_raw_ptr(giterated_static_runtime::get_runtime_reference().as_ptr()) |
59 | // } |
60 | // } |
61 | |
62 | // #[async_trait::async_trait(?Send)] |
63 | // impl ObjectBackend for RuntimeState { |
64 | // async fn object_operation<O, D>( |
65 | // &self, |
66 | // object: O, |
67 | // _operation: &str, |
68 | // payload: D, |
69 | // _operation_state: &OperationState, |
70 | // ) -> Result<D::Success, OperationError<D::Failure>> |
71 | // where |
72 | // O: GiteratedObject + Debug + 'static, |
73 | // D: GiteratedOperation<O> + Debug + 'static, |
74 | // D::Success: Clone, |
75 | // D::Failure: Clone, |
76 | // { |
77 | // // let _object = AnyObject::new(object); |
78 | // // let _operation = AnyOperation::new(payload); |
79 | |
80 | // todo!() |
81 | // } |
82 | |
83 | // async fn get_object<O: GiteratedObject + Debug + 'static>( |
84 | // &self, |
85 | // object_str: &str, |
86 | // operation_state: &OperationState, |
87 | // ) -> Result<Object<O, Self>, OperationError<ObjectRequestError>> { |
88 | // // let object = unsafe { |
89 | // // (self.vtable.get_object)( |
90 | // // Self::runtime_state(), |
91 | // // object_str, |
92 | // // &mut operation_state.clone(), |
93 | // // ) |
94 | // // }?; |
95 | |
96 | // // let object = unsafe { object.cast::<O>() }; |
97 | |
98 | // panic!("object casted"); |
99 | |
100 | // // Ok(unsafe { Object::new_unchecked(object, self.clone()) }) |
101 | |
102 | // todo!() |
103 | // } |
104 | // } |
105 |