use alloc::string::String;
use serde::{Deserialize, Serialize};
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
pub struct Conditions(String);
impl Conditions {
pub fn new(conditions: &str) -> Self {
Self(conditions.into())
}
}
impl AsRef<str> for Conditions {
fn as_ref(&self) -> &str {
self.0.as_ref()
}
}
impl From<String> for Conditions {
fn from(source: String) -> Self {
Self(source)
}
}
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
pub struct Context(String);
impl Context {
pub fn new(context: &str) -> Self {
Self(context.into())
}
}
impl AsRef<str> for Context {
fn as_ref(&self) -> &str {
self.0.as_ref()
}
}
impl From<String> for Context {
fn from(source: String) -> Self {
Self(source)
}
}