Skip to main content

fluvio_sc_schema/smartmodule/
mod.rs

1mod client;
2pub use fluvio_controlplane_metadata::smartmodule::*;
3pub use client::*;
4
5mod convert {
6
7    use fluvio_controlplane_metadata::smartmodule::{SmartModuleWasmSummary, SmartModuleWasm};
8
9    use crate::{AdminSpec, CreatableAdminSpec, DeletableAdminSpec, UpdatableAdminSpec};
10    use super::SmartModuleSpec;
11
12    impl AdminSpec for SmartModuleSpec {
13        fn summary(self) -> Self {
14            Self {
15                meta: self.meta,
16                summary: Some(SmartModuleWasmSummary {
17                    wasm_length: self.wasm.payload.len() as u32,
18                }),
19                wasm: SmartModuleWasm::default(),
20            }
21        }
22    }
23
24    impl CreatableAdminSpec for SmartModuleSpec {}
25
26    impl DeletableAdminSpec for SmartModuleSpec {
27        type DeleteKey = String;
28    }
29
30    impl UpdatableAdminSpec for SmartModuleSpec {
31        type UpdateKey = String;
32        type UpdateAction = String;
33    }
34}