Re-expose Operation State in generics.
This is the worst code I have ever written. I hate the way this changes everything. ugh.
parent: tbd commit: 90db3e2
1 | // use std::sync::Arc; |
2 | |
3 | // use giterated_models::error::OperationError; |
4 | // use giterated_stack::GiteratedStack; |
5 | // use serde_json::Value; |
6 | |
7 | // use crate::{cache_update::AnyObject, CacheSubstack}; |
8 | |
9 | // pub async fn try_value_get( |
10 | // object: AnyObject<'_>, |
11 | // value_name: &str, |
12 | // cache: CacheSubstack, |
13 | // stack: Arc<GiteratedStack>, |
14 | // ) -> Result<Value, OperationError<anyhow::Error>> { |
15 | // todo!() |
16 | // } |
17 | |
18 | use OperationError; |
19 | use ; |
20 | use trace; |
21 | |
22 | use crate::; |
23 | |
24 | pub async |
25 | object: AnyObject, |
26 | value_kind: String, |
27 | cache: CacheSubstack, |
28 | stack: GiteratedStack, |
29 | |
30 | let object_meta = stack |
31 | .metadata |
32 | .objects |
33 | .get |
34 | .ok_or_else?; |
35 | let object_str = ; |
36 | let cache_key = CacheKey |
37 | object: object_str, |
38 | value_name: value_kind.clone, |
39 | ; |
40 | |
41 | trace!; |
42 | |
43 | if let Some = cache.cache.get .await |
44 | trace!; |
45 | |
46 | Ok |
47 | else |
48 | trace!; |
49 | Err |
50 | |
51 | |
52 |