Mx

Struct Mx 

Source
pub struct Mx<'s, C: GenericClass = InClass> { /* private fields */ }
Expand description

View for RDATA of MX records. Currently implemented for IN class only.

Implementations§

Source§

impl Mx<'_, InClass>

Source

pub fn preference(&self) -> u16

Source

pub fn exchange(&self) -> Name<'_>

Trait Implementations§

Source§

impl<'s> BorrowedView<'s> for Mx<'s, InClass>

Source§

fn source(&self) -> &'s [u8]

Source§

fn offset(&self) -> usize

Source§

fn len(&self) -> usize

Source§

fn as_bytes(&self) -> &'s [u8]

Source§

impl Format for Mx<'_>

Source§

fn fmt(&self, w: &mut Wrapper<'_, '_>) -> Result

Source§

impl<'s> From<Mx<'s>> for Rdata<'s>

Source§

fn from(inner: Mx<'s>) -> Self

Converts to this type from the input type.
Source§

impl<'s> View<'s> for Mx<'s, InClass>

Source§

type Error = RdataError

Source§

fn view_range( source: &'s [u8], range: Range<usize>, ) -> Result<Self, Self::Error>

Source§

fn view( source: &'s [u8], range: impl RangeBounds<usize>, ) -> Result<Self, Self::Error>
where Self: Sized,

Auto Trait Implementations§

§

impl<'s, C> Freeze for Mx<'s, C>

§

impl<'s, C> RefUnwindSafe for Mx<'s, C>
where C: RefUnwindSafe,

§

impl<'s, C> Send for Mx<'s, C>
where C: Send,

§

impl<'s, C> Sync for Mx<'s, C>
where C: Sync,

§

impl<'s, C> Unpin for Mx<'s, C>
where C: Unpin,

§

impl<'s, C> UnwindSafe for Mx<'s, C>
where C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.