Skip to main content

nyx_space/io/
python.rs

1use super::ExportCfg;
2use pyo3::prelude::*;
3
4#[pymethods]
5impl ExportCfg {
6    #[pyo3(signature=(timestamped = false))]
7    #[new]
8    fn py_new(timestamped: bool) -> Self {
9        if timestamped {
10            Self::timestamped()
11        } else {
12            Self::default()
13        }
14    }
15
16    fn __str__(&self) -> String {
17        format!("{self:?}")
18    }
19
20    fn __repr__(&self) -> String {
21        format!("{self:?} @ {self:p}")
22    }
23}