#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(feature = "python")]
use pyo3::prelude::*;
#[cfg(feature = "python")]
use pyo3::types::PyAny;
#[cfg(feature = "python")]
use pyo3::Bound;
#[cfg(feature = "python")]
#[cfg_attr(docsrs, doc(cfg(feature = "python")))]
#[pyclass]
struct AKIEngine {
fo_i: String,
}
#[cfg(feature = "python")]
#[cfg_attr(docsrs, doc(cfg(feature = "python")))]
#[pymethods]
impl AKIEngine {
#[new]
fn new(fo_i: String) -> Self {
AKIEngine { fo_i }
}
fn seal_ppp(&self, _ppp: &Bound<'_, PyAny>) -> PyResult<Vec<u8>> {
Ok(vec![0xAA, 0xBB, 0xCC])
}
#[getter]
fn fo_i(&self) -> &str {
&self.fo_i
}
}
#[cfg(feature = "python")]
#[cfg_attr(docsrs, doc(cfg(feature = "python")))]
#[pymodule]
fn _core(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_class::<AKIEngine>()?;
Ok(())
}