Struct gmime::ParserOptions[]

pub struct ParserOptions(_);

A set of parser options used by Parser and various other parsing functions.

Methods

impl ParserOptions
[src]

Creates a new set of ParserOptions.

Returns

a newly allocated set of ParserOptions with the default values.

Clones a ParserOptions.

Returns

a newly allocated ParserOptions.

Gets the compliance mode that should be used when parsing rfc822 addresses.

Note: Even in RfcComplianceMode::Strict mode, the address parser is fairly liberal in what it accepts. Setting it to RfcComplianceMode::Loose just makes it try harder to deal with garbage input.

Returns

the compliance mode that is currently set.

Gets whether or not the rfc822 address parser should allow addresses without a domain.

In general, you'll probably want this value to be false (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots) that do not properly quote the name when it contains a comma.

This option exists in order to allow parsing of mailbox addresses that do not have a domain component. These types of addresses are rare and were typically only used when sending mail to other users on the same UNIX system.

Returns

true if the address parser should allow addresses without a domain.

Important traits for Vec<u8>

Gets the fallback charsets to try when decoding 8-bit headers.

Returns

a None-terminated list of charsets to try when decoding 8-bit headers.

Gets the compliance mode that should be used when parsing Content-Type and Content-Disposition parameters.

Note: Even in RfcComplianceMode::Strict mode, the parameter parser is fairly liberal in what it accepts. Setting it to RfcComplianceMode::Loose just makes it try harder to deal with garbage input.

Returns

the compliance mode that is currently set.

Gets the compliance mode that should be used when parsing rfc2047 encoded words.

Note: Even in RfcComplianceMode::Strict mode, the rfc2047 parser is fairly liberal in what it accepts. Setting it to RfcComplianceMode::Loose just makes it try harder to deal with garbage input.

Returns

the compliance mode that is currently set.

Sets the compliance mode that should be used when parsing rfc822 addresses.

In general, you'll probably want this value to be RfcComplianceMode::Loose (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots).

Note: Even in RfcComplianceMode::Strict mode, the address parser is fairly liberal in what it accepts. Setting it to RfcComplianceMode::Loose just makes it try harder to deal with garbage input.

mode

a RfcComplianceMode

Sets whether the rfc822 address parser should allow addresses without a domain.

In general, you'll probably want this value to be false (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots) that do not properly quote the name when it contains a comma.

This option exists in order to allow parsing of mailbox addresses that do not have a domain component. These types of addresses are rare and were typically only used when sending mail to other users on the same UNIX system.

allow

true if the parser should allow addresses without a domain or false otherwise

Sets the fallback charsets to try when decoding 8-bit headers.

Note: It is recommended that the list of charsets start with utf-8 and end with iso-8859-1.

charsets

a None-terminated list of charsets or None for the default list

Sets the compliance mode that should be used when parsing Content-Type and Content-Disposition parameters.

In general, you'll probably want this value to be RfcComplianceMode::Loose (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots).

Note: Even in RfcComplianceMode::Strict mode, the parameter parser is fairly liberal in what it accepts. Setting it to RfcComplianceMode::Loose just makes it try harder to deal with garbage input.

mode

a RfcComplianceMode

Sets the compliance mode that should be used when parsing rfc2047 encoded words.

In general, you'll probably want this value to be RfcComplianceMode::Loose (the default) as it allows maximum interoperability with existing (broken) mail clients and other mail software such as sloppily written perl scripts (aka spambots).

Note: Even in RfcComplianceMode::Strict mode, the parameter parser is fairly liberal in what it accepts. Setting it to RfcComplianceMode::Loose just makes it try harder to deal with garbage input.

mode

a RfcComplianceMode

Gets the default parser options.

Returns

the default parser options.

Trait Implementations

impl Clone for ParserOptions

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for ParserOptions

Formats the value using the given formatter. Read more

impl StaticType for ParserOptions

Returns the type identifier of Self.

impl Default for ParserOptions
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl !Send for ParserOptions

impl !Sync for ParserOptions