Automatically convert one error to another.
impl From<IpNetworkError> for SpfError {
fn from(err: IpNetworkError) -> Self {
SpfError::InvalidIPAddr(err)
}
}
Reference:
Rust: Enums to wrap multiple errors
Automatically convert one error to another.
impl From<IpNetworkError> for SpfError {
fn from(err: IpNetworkError) -> Self {
SpfError::InvalidIPAddr(err)
}
}
Rust: Enums to wrap multiple errors