pub trait AddressFormat: Sized {
// Required methods
fn parse(s: &str) -> Result<Self, AddressError>;
fn validate(s: &str) -> Result<(), AddressError>;
fn to_string(&self) -> String;
}Expand description
Common trait for all address types.
Required Methods§
Sourcefn parse(s: &str) -> Result<Self, AddressError>
fn parse(s: &str) -> Result<Self, AddressError>
Parse from string.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.