#[allow(missing_docs)] #[non_exhaustive]
#[derive(
::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
)]
pub struct Status(String);
impl Status {
pub fn as_str(&self) -> &str {
&self.0
}
pub const fn values() -> &'static [&'static str] {
&["Active", "Expired"]
}
}
impl<T> ::std::convert::From<T> for Status
where
T: ::std::convert::AsRef<str>,
{
fn from(s: T) -> Self {
Status(s.as_ref().to_owned())
}
}
impl ::std::str::FromStr for Status {
type Err = ::std::convert::Infallible;
fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
::std::result::Result::Ok(Status::from(s))
}
}