pub enum SpecificFields<'a> {
    Basic {
        type_: IString<'a>,
        subtype: IString<'a>,
    },
    Message {
        envelope: Envelope<'a>,
        body_structure: Box<BodyStructure<'a>>,
        number_of_lines: u32,
    },
    Text {
        subtype: IString<'a>,
        number_of_lines: u32,
    },
}

Variants

Basic

Fields

type_: IString<'a>

A string giving the content media type name as defined in [MIME-IMB].

subtype: IString<'a>

A string giving the content subtype name as defined in [MIME-IMB].

Example (not in RFC)

Single application/{voodoo, unknown, whatever, meh} is represented as “basic”

(
    "application" "voodoo" NIL NIL NIL "7bit" 20
                           ^^^ ^^^ ^^^ ^^^^^^ ^^
                           |   |   |   |      | size
                           |   |   |   | content transfer encoding
                           |   |   | description
                           |   | id
                           | parameter list

    NIL NIL NIL NIL
    ^^^ ^^^ ^^^ ^^^
    |   |   |   | location
    |   |   | language
    |   | disposition
    | md5
)

Message

Fields

envelope: Envelope<'a>

the envelope structure,

body_structure: Box<BodyStructure<'a>>

body structure,

number_of_lines: u32

and size in text lines of the encapsulated message.

Example (not in RFC)

Single message/rfc822 is represented as “message”

(
    "message" "rfc822" NIL NIL NIL "7bit" 123
                       ^^^ ^^^ ^^^ ^^^^^^ ^^^
                       |   |   |   |      | size
                       |   |   |   | content transfer encoding
                       |   |   | description
                       |   | id
                       | parameter list

    (
        NIL "message.inner.subject.ljcwooqy" ((NIL NIL "extern" "company.com")) ((NIL NIL "extern" "company.com")) ((NIL NIL "extern" "company.com")) ((NIL NIL "admin" "seurity.com")) NIL NIL NIL NIL
    )

    (
        "text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 31
        2
        NIL NIL NIL NIL
    )

    6
    ^
    | number of lines

    NIL NIL NIL NIL
    ^^^ ^^^ ^^^ ^^^
    |   |   |   | location
    |   |   | language
    |   | disposition
    | md5
)

A body type of type MESSAGE and subtype RFC822 contains, immediately after the basic fields,

Text

Fields

subtype: IString<'a>
number_of_lines: u32

the size of the body in text lines.

Example (not in RFC)

Single text/plain is represented as “text”

(
    "text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 25
                   ^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^^^^^^ ^^
                   |                      |   |   |      | size
                   |                      |   |   | content transfer encoding
                   |                      |   | description
                   |                      | id
                   | parameter list

    1
    ^
    | number of lines

    NIL NIL NIL NIL
    ^^^ ^^^ ^^^ ^^^
    |   |   |   | location
    |   |   | language
    |   | disposition
    | md5
)

A body type of type TEXT contains, immediately after the basic fields,

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.