Struct anitomy::Options

source ·
pub struct Options {
    pub allowed_delimiters: Vec<char>,
    pub ignored_strings: Vec<String>,
    pub parse_episode_number: bool,
    pub parse_episode_title: bool,
    pub parse_file_extension: bool,
    pub parse_release_group: bool,
}
Expand description

The options used by Anitomy to determine how to parse a filename.

Fields

allowed_delimiters: Vec<char>ignored_strings: Vec<String>parse_episode_number: boolparse_episode_title: boolparse_file_extension: boolparse_release_group: bool

Implementations

Construct a new instance of Options with the given settings.

Adds a delimiter char to the list of allowed delimiters.

Replaces the list of allowed delimiters.

Adds a string to the list of ignored strings.

Replaces the list of ignored strings.

Sets whether Anitomy should attempt to parse the episode number.

Sets whether Anitomy should attempt to parse the episode title.

Sets whether Anitomy should attempt to parse the file extension.

Sets whether Anitomy should attempt to parse the release group.

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

Constructs a new instance of Options with the Anitomy defaults.

Equivalent to:

Options {
    allowed_delimiters: vec![' ', '_', '.', '&', '+', ',', '|'],
    ignored_strings: vec![],
    parse_episode_number: true,
    parse_episode_title: true,
    parse_file_extension: true,
    parse_release_group: true,
}
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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.