change: Add From<Address> implementation for Mailbox (#879)
from-address: It's a simple implementation - it uses the address as the address and uses `None` for the name parameter.
This commit is contained in:
@@ -125,6 +125,12 @@ impl FromStr for Mailbox {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Address> for Mailbox {
|
||||
fn from(value: Address) -> Self {
|
||||
Self::new(None, value)
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents a sequence of [`Mailbox`] instances.
|
||||
///
|
||||
/// This type contains a sequence of mailboxes (_Some Name \<user@domain.tld\>, Another Name \<other@domain.tld\>, withoutname@domain.tld, ..._).
|
||||
|
||||
Reference in New Issue
Block a user