use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter};
use std::str::FromStr;
#[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq)]
pub struct Address(pub(crate) String);
impl FromStr for Address {
type Err = ();
fn from_str(addr: &str) -> Result<Self, Self::Err> {
Ok(Self(addr.to_owned()))
}
}
impl Display for Address {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.write_str(&self.0)
}
}