use aliri_braid::braid;
#[braid(serde)]
pub struct MinimalUsernameBuf(MinimalString);
#[derive(
Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize,
)]
pub struct MinimalString(String);
impl From<String> for MinimalString {
fn from(s: String) -> Self {
MinimalString(s)
}
}
impl From<&'_ str> for MinimalString {
fn from(s: &str) -> Self {
MinimalString(s.into())
}
}
impl From<Box<str>> for MinimalString {
fn from(s: Box<str>) -> Self {
MinimalString(s.into())
}
}
impl AsRef<str> for MinimalString {
fn as_ref(&self) -> &str {
self.0.as_ref()
}
}
impl From<MinimalString> for String {
fn from(s: MinimalString) -> Self {
s.0
}
}