use std::borrow::Cow;
mod as_ref;
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Variable(Cow<'static, str>);
#[derive(Clone, Debug)]
pub struct InvalidVariable(pub Cow<'static, str>);
impl Variable {
pub fn try_create<Var>(variable: Var) -> Result<Self, InvalidVariable>
where
Var: AsRef<str>,
{
Ok(Variable(Cow::Owned(variable.as_ref().into())))
}
}