pub struct WAddress { /* 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.
Implementations§
Source§impl WAddress
impl WAddress
Sourcepub fn from(data: &str) -> Option<WAddress>
pub fn from(data: &str) -> Option<WAddress>
Creates a new WAddress from a string. If the string does not contain a valid workspace address, None will be returned.
Sourcepub fn from_maddress(maddr: &MAddress) -> Option<WAddress>
pub fn from_maddress(maddr: &MAddress) -> Option<WAddress>
Creates a WAddress from an MAddress instance if compatible. This is because all workspace addresses are valid Mensago addresses, but not the other way around.
Sourcepub fn from_parts(wid: &RandomID, domain: &Domain) -> WAddress
pub fn from_parts(wid: &RandomID, domain: &Domain) -> WAddress
Creates a WAddress 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 WAddress
impl PartialOrd for WAddress
impl StructuralPartialEq for WAddress
Auto Trait Implementations§
impl Freeze for WAddress
impl RefUnwindSafe for WAddress
impl Send for WAddress
impl Sync for WAddress
impl Unpin for WAddress
impl UnwindSafe for WAddress
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