chore+feat(home-assistant): update to pyo3 0.27 and update extraction errors, switch out SmolStr for Arc<str>, tighten up light service calls and implement some for notify, start implementing units of measurement like for power
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
use std::str::FromStr;
|
||||
use std::{str::FromStr, sync::Arc};
|
||||
|
||||
use pyo3::{exceptions::PyValueError, PyErr};
|
||||
use smol_str::SmolStr;
|
||||
use snafu::Snafu;
|
||||
|
||||
// TODO: derive(PyFromStr) (analogous to serde_with::DeserializeFromStr) once I make one
|
||||
#[derive(Debug, Clone, derive_more::Display)]
|
||||
pub struct Slug(SmolStr);
|
||||
pub struct Slug(Arc<str>);
|
||||
|
||||
#[derive(Debug, Clone, Snafu)]
|
||||
#[snafu(display("expected a lowercase ASCII alphabetical character (i.e. a through z) or a digit (i.e. 0 through 9) or an underscore (i.e. _) but encountered {encountered}"))]
|
||||
|
||||
Reference in New Issue
Block a user