Struct anitomy::Options [−][src]
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, }
The options used by Anitomy to determine how to parse a filename.
Fields
allowed_delimiters: Vec<char>
ignored_strings: Vec<String>
parse_episode_number: bool
parse_episode_title: bool
parse_file_extension: bool
parse_release_group: bool
Methods
impl Options
[src]
impl Options
pub fn new<S: AsRef<str>>(
allowed_delimiters: &[char],
ignored_strings: &[S],
parse_episode_number: bool,
parse_episode_title: bool,
parse_file_extension: bool,
parse_release_group: bool
) -> Self
[src]
pub fn new<S: AsRef<str>>(
allowed_delimiters: &[char],
ignored_strings: &[S],
parse_episode_number: bool,
parse_episode_title: bool,
parse_file_extension: bool,
parse_release_group: bool
) -> Self
Construct a new instance of Options with the given settings.
ⓘImportant traits for &'a mut Rpub fn allow_delimiter(&mut self, delimiter: char) -> &mut Self
[src]
pub fn allow_delimiter(&mut self, delimiter: char) -> &mut Self
Adds a delimiter char to the list of allowed delimiters.
ⓘImportant traits for &'a mut Rpub fn allow_delimiters(&mut self, delimiters: &[char]) -> &mut Self
[src]
pub fn allow_delimiters(&mut self, delimiters: &[char]) -> &mut Self
Replaces the list of allowed delimiters.
ⓘImportant traits for &'a mut Rpub fn ignore_string<S: AsRef<str>>(&mut self, string: S) -> &mut Self
[src]
pub fn ignore_string<S: AsRef<str>>(&mut self, string: S) -> &mut Self
Adds a string to the list of ignored strings.
ⓘImportant traits for &'a mut Rpub fn ignore_strings<S: AsRef<str>>(&mut self, strings: &[S]) -> &mut Self
[src]
pub fn ignore_strings<S: AsRef<str>>(&mut self, strings: &[S]) -> &mut Self
Replaces the list of ignored strings.
ⓘImportant traits for &'a mut Rpub fn parse_episode_number(&mut self, parse: bool) -> &mut Self
[src]
pub fn parse_episode_number(&mut self, parse: bool) -> &mut Self
Sets whether Anitomy should attempt to parse the episode number.
ⓘImportant traits for &'a mut Rpub fn parse_episode_title(&mut self, parse: bool) -> &mut Self
[src]
pub fn parse_episode_title(&mut self, parse: bool) -> &mut Self
Sets whether Anitomy should attempt to parse the episode title.
ⓘImportant traits for &'a mut Rpub fn parse_file_extension(&mut self, parse: bool) -> &mut Self
[src]
pub fn parse_file_extension(&mut self, parse: bool) -> &mut Self
Sets whether Anitomy should attempt to parse the file extension.
ⓘImportant traits for &'a mut Rpub fn parse_release_group(&mut self, parse: bool) -> &mut Self
[src]
pub fn parse_release_group(&mut self, parse: bool) -> &mut Self
Sets whether Anitomy should attempt to parse the release group.
Trait Implementations
impl Debug for Options
[src]
impl Debug for Options
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Options
[src]
impl Clone for Options
fn clone(&self) -> Options
[src]
fn clone(&self) -> Options
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Options
[src]
impl PartialEq for Options
fn eq(&self, other: &Options) -> bool
[src]
fn eq(&self, other: &Options) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Options) -> bool
[src]
fn ne(&self, other: &Options) -> bool
This method tests for !=
.
impl Eq for Options
[src]
impl Eq for Options
impl Default for Options
[src]
impl Default for Options
fn default() -> Self
[src]
fn default() -> Self
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, }