1#![cfg_attr(docsrs, feature(doc_cfg))]
2#[cfg(feature = "python")]
8use pyo3::prelude::*;
9#[cfg(feature = "python")]
10use pyo3::types::PyAny;
11#[cfg(feature = "python")]
12use pyo3::Bound;
13
14#[cfg(feature = "python")]
15#[cfg_attr(docsrs, doc(cfg(feature = "python")))]
16#[pyclass]
17struct AKIEngine {
18 fo_i: String,
19}
20
21#[cfg(feature = "python")]
22#[cfg_attr(docsrs, doc(cfg(feature = "python")))]
23#[pymethods]
24impl AKIEngine {
25 #[new]
26 fn new(fo_i: String) -> Self {
27 AKIEngine { fo_i }
28 }
29
30 fn seal_ppp(&self, _ppp: &Bound<'_, PyAny>) -> PyResult<Vec<u8>> {
32 Ok(vec![0xAA, 0xBB, 0xCC])
33 }
34
35 #[getter]
36 fn fo_i(&self) -> &str {
37 &self.fo_i
38 }
39}
40
41#[cfg(feature = "python")]
42#[cfg_attr(docsrs, doc(cfg(feature = "python")))]
43#[pymodule]
44fn _core(m: &Bound<'_, PyModule>) -> PyResult<()> {
45 m.add_class::<AKIEngine>()?;
46 Ok(())
47}