pub struct MX { /* private fields */ }
Expand description
RFC 1035, DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION, November 1987
3.3.9. MX RDATA format
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| PREFERENCE |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
/ EXCHANGE /
/ /
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
MX records cause type A additional section processing for the host
specified by EXCHANGE. The use of MX RRs is explained in detail in
[RFC-974].
Implementations§
Source§impl MX
impl MX
Sourcepub fn preference(&self) -> u16
pub fn preference(&self) -> u16
RFC 1035, DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION, November 1987
PREFERENCE A 16 bit integer which specifies the preference given to
this RR among others at the same owner. Lower values
are preferred.
Sourcepub fn exchange(&self) -> &Name
pub fn exchange(&self) -> &Name
RFC 1035, DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION, November 1987
EXCHANGE A <domain-name> which specifies a host willing to act as
a mail exchange for the owner name.
Trait Implementations§
Source§impl<'r> BinDecodable<'r> for MX
impl<'r> BinDecodable<'r> for MX
Source§fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>
fn read(decoder: &mut BinDecoder<'r>) -> Result<Self, ProtoError>
Read the type from the stream
Source§fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
fn from_bytes(bytes: &'r [u8]) -> Result<Self, ProtoError>
Returns the object in binary form
Source§impl BinEncodable for MX
impl BinEncodable for MX
Source§fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
fn emit(&self, encoder: &mut BinEncoder<'_>) -> Result<(), ProtoError>
Write the type to the stream
Source§impl<'de> Deserialize<'de> for MX
impl<'de> Deserialize<'de> for MX
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MX
impl Display for MX
RFC 1033, DOMAIN OPERATIONS GUIDE, November 1987
MX (Mail Exchanger) (See RFC-974 for more details.)
<name> [<ttl>] [<class>] MX <preference> <host>
MX records specify where mail for a domain name should be delivered.
There may be multiple MX records for a particular name. The
preference value specifies the order a mailer should try multiple MX
records when delivering mail. Zero is the highest preference.
Multiple records for the same name may have the same preference.
A host BAR.FOO.COM may want its mail to be delivered to the host
PO.FOO.COM and would then use the MX record:
BAR.FOO.COM. MX 10 PO.FOO.COM.
A host BAZ.FOO.COM may want its mail to be delivered to one of three
different machines, in the following order:
BAZ.FOO.COM. MX 10 PO1.FOO.COM.
MX 20 PO2.FOO.COM.
MX 30 PO3.FOO.COM.
An entire domain of hosts not connected to the Internet may want
their mail to go through a mail gateway that knows how to deliver
mail to them. If they would like mail addressed to any host in the
domain FOO.COM to go through the mail gateway they might use:
FOO.COM. MX 10 RELAY.CS.NET.
*.FOO.COM. MX 20 RELAY.CS.NET.
Note that you can specify a wildcard in the MX record to match on
anything in FOO.COM, but that it won't match a plain FOO.COM.
Source§impl RecordData for MX
impl RecordData for MX
Source§fn try_from_rdata(data: RData) -> Result<Self, RData>
fn try_from_rdata(data: RData) -> Result<Self, RData>
Attempts to convert to this RecordData from the RData type, if it is not the correct type the original is returned
Source§fn try_borrow(data: &RData) -> Option<&Self>
fn try_borrow(data: &RData) -> Option<&Self>
Attempts to borrow this RecordData from the RData type, if it is not the correct type the original is returned
Source§fn record_type(&self) -> RecordType
fn record_type(&self) -> RecordType
Get the associated RecordType for the RecordData
Source§fn into_rdata(self) -> RData
fn into_rdata(self) -> RData
Converts this RecordData into generic RecordData
impl Eq for MX
impl StructuralPartialEq for MX
Auto Trait Implementations§
impl Freeze for MX
impl RefUnwindSafe for MX
impl Send for MX
impl Sync for MX
impl Unpin for MX
impl UnwindSafe for MX
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.