feat: FromPyFromStr and ToStrToPy macros YAY
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
use std::{str::FromStr, sync::Arc};
|
||||
|
||||
use pyo3::{exceptions::PyValueError, PyErr};
|
||||
use python_utils::{FromPyFromStr, ToStrToPy};
|
||||
use snafu::Snafu;
|
||||
|
||||
// TODO: derive(PyFromStr) (analogous to serde_with::DeserializeFromStr) once I make one
|
||||
#[derive(Debug, Clone, derive_more::Display)]
|
||||
#[derive(Debug, Clone, derive_more::Display, FromPyFromStr, ToStrToPy)]
|
||||
pub struct Slug(Arc<str>);
|
||||
|
||||
#[derive(Debug, Clone, Snafu)]
|
||||
|
||||
Reference in New Issue
Block a user