chalkydri/subsystems/python/api.rs
1use std::borrow::Cow;
2
3use pyo3::{prelude::*, types::PyBytes};
4
5pub(crate) fn module(py: Python) -> PyResult<()> {
6 let m = PyModule::new(py, "chalkydri")?;
7 m.add_class::<Camera>()?;
8 Ok(())
9}
10
11#[pyclass]
12pub(crate) struct Camera {}
13#[pymethods]
14impl Camera {
15 fn get_frame(self_: PyRef<'_, Self>) -> PyResult<Cow<[u8]>> {
16 Ok(Cow::Borrowed(&[0u8]))
17 }
18}