[−][src]Enum mail_smtp::misc::ClientId
Represents the identity of an client
If you connect to an MSA this can be as simple as localhost, through for smtp communication between servers or for connecting with an MX server this should be a public facing domain or ip address
MSA: Mail Submission Agent
MX: Mail Exchanger
Variants
Domain(Domain)
a registered domain
AddressLiteral(AddressLiteral)
a ipv4/ipv6 address, through theoretically others protocols are possible too
Implementations
impl ClientId
[src]
pub fn localhost() -> ClientId
[src]
creates a client identity for "localhost" (here fixed to 127.0.0.1)
This can be used as client identity when connecting a mail client to a Mail Submission Agent (MSA), but should not be used when connecting to an Mail Exchanger (MX).
pub fn hostname() -> ClientId
[src]
creates a client identity using hostname (fallback localhost)
This uses the hostname
crate to create a client identity.
If this fails ClientId::localhost()
is used.
pub fn try_hostname() -> Option<ClientId>
[src]
creates a client identity if a hostname can be found
Implementation Note
As the hostname
crate currently only returns an Option
we also do so.
Trait Implementations
impl Clone for ClientId
[src]
impl Debug for ClientId
[src]
impl From<AddressLiteral> for ClientId
[src]
fn from(adl: AddressLiteral) -> ClientId
[src]
impl From<Domain> for ClientId
[src]
impl From<IpAddr> for ClientId
[src]
impl From<Ipv4Addr> for ClientId
[src]
impl From<Ipv6Addr> for ClientId
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClientId
impl Send for ClientId
impl Sync for ClientId
impl Unpin for ClientId
impl UnwindSafe for ClientId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> HeaderTryFrom<T> for T
[src]
fn try_from(val: T) -> Result<T, ComponentCreationError>
[src]
impl<F, T> HeaderTryInto<T> for F where
T: HeaderTryFrom<F>,
[src]
T: HeaderTryFrom<F>,
fn try_into(self) -> Result<T, ComponentCreationError>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,