[][src]Struct viaspf::record::Record

pub struct Record {
    pub terms: Vec<Term>,
}

An SPF record.

Examples

use viaspf::record::Record;

let record = "v=spf1 -all".parse::<Record>()?;
assert_eq!(record.to_string(), "v=spf1 -all");

Fields

terms: Vec<Term>

The record’s terms.

Implementations

impl Record[src]

pub fn directives(&self) -> impl Iterator<Item = &Directive>[src]

Returns an iterator over the record’s directives.

pub fn modifiers(&self) -> impl Iterator<Item = &Modifier>[src]

Returns an iterator over the record’s modifiers.

Trait Implementations

impl Clone for Record[src]

impl Debug for Record[src]

impl Default for Record[src]

impl Display for Record[src]

impl Eq for Record[src]

impl From<Vec<Term>> for Record[src]

impl FromIterator<Term> for Record[src]

impl FromStr for Record[src]

type Err = ParseRecordError

The associated error which can be returned from parsing.

impl Hash for Record[src]

impl IntoIterator for Record[src]

type Item = Term

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

impl PartialEq<Record> for Record[src]

impl StructuralEq for Record[src]

impl StructuralPartialEq for Record[src]

Auto Trait Implementations

impl RefUnwindSafe for Record

impl Send for Record

impl Sync for Record

impl Unpin for Record

impl UnwindSafe for Record

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.