pub struct MAddress {
pub uid: UserID,
pub domain: Domain,
/* private fields */
}Expand description
A basic data type representing a full Mensago address. It is used to ensure passing around valid data within the library.
Fields§
§uid: UserID§domain: DomainImplementations§
Source§impl MAddress
impl MAddress
Sourcepub fn from(data: &str) -> Option<MAddress>
pub fn from(data: &str) -> Option<MAddress>
Creates a new MAddress from a string. If the string does not contain a valid Mensago address, None will be returned.
Sourcepub fn from_waddress(waddr: &WAddress) -> MAddress
pub fn from_waddress(waddr: &WAddress) -> MAddress
Creates an MAddress from an WAddress instance
Sourcepub fn from_parts(uid: &UserID, domain: &Domain) -> MAddress
pub fn from_parts(uid: &UserID, domain: &Domain) -> MAddress
Creates an MAddress from its components
Sourcepub fn get_domain(&self) -> &Domain
pub fn get_domain(&self) -> &Domain
Returns the Domain portion of the address
Trait Implementations§
Source§impl PartialOrd for MAddress
impl PartialOrd for MAddress
impl StructuralPartialEq for MAddress
Auto Trait Implementations§
impl Freeze for MAddress
impl RefUnwindSafe for MAddress
impl Send for MAddress
impl Sync for MAddress
impl Unpin for MAddress
impl UnwindSafe for MAddress
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more