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