Struct todo_r::TodoRBuilder
source · pub struct TodoRBuilder { /* private fields */ }
Expand description
A builder to create a TodoR with a custom configuration. Customization occurs in two forms: using manual functions and adding config files.
Functions
Use functions such as add_tag()
to add to the config.
Functions that have override
in them will fully override settings from config files.
Config files
Config files are added using add_config_file()
.
For an example config file, use todo_r::write_example_config()
.
Implementations
sourceimpl TodoRBuilder
impl TodoRBuilder
sourcepub fn new() -> TodoRBuilder
pub fn new() -> TodoRBuilder
Creates TodoRBuilder using the default configuration.
sourcepub fn with_no_config() -> TodoRBuilder
pub fn with_no_config() -> TodoRBuilder
Creates TodoRBuilder with no configuration.
sourcepub fn add_config_file(&mut self, config_path: &Path) -> Result<&mut Self, Error>
pub fn add_config_file(&mut self, config_path: &Path) -> Result<&mut Self, Error>
Adds config file for TodoR.
sourcepub fn add_tag<'a, S: Into<Cow<'a, str>>>(&mut self, tag: S) -> &mut Self
pub fn add_tag<'a, S: Into<Cow<'a, str>>>(&mut self, tag: S) -> &mut Self
Adds tag for TodoR to look for without overriding tags from config files.
Adds tags for TodoR to look for without overriding tags from config files.
sourcepub fn add_override_tag<'a, S: Into<Cow<'a, str>>>(
&mut self,
tag: S
) -> &mut Self
pub fn add_override_tag<'a, S: Into<Cow<'a, str>>>(
&mut self,
tag: S
) -> &mut Self
Adds tag for TodoR to look for. This overrides tags from config files.
Adds tags for TodoR to look for. This overrides tags from config files.
sourcepub fn set_verbose(&mut self, verbose: bool) -> &mut Self
pub fn set_verbose(&mut self, verbose: bool) -> &mut Self
Overrides verbose from config files.
sourcepub fn set_no_style(&mut self) -> &mut Self
pub fn set_no_style(&mut self) -> &mut Self
Sets the terminal output of TodoR to be with no styles.
sourcepub fn add_override_ignore_path(
&mut self,
path: &str
) -> Result<&mut Self, Error>
pub fn add_override_ignore_path(
&mut self,
path: &str
) -> Result<&mut Self, Error>
Adds path for TodoR to ignore. This overrides ignore paths from config files.
sourcepub fn add_override_ignore_paths<I, S>(
&mut self,
paths: I
) -> Result<&mut Self, Error>where
I: IntoIterator<Item = S>,
S: AsRef<str>,
pub fn add_override_ignore_paths<I, S>(
&mut self,
paths: I
) -> Result<&mut Self, Error>where
I: IntoIterator<Item = S>,
S: AsRef<str>,
Adds paths for TodoR to ignore. This overrides ignore paths from config files.
Trait Implementations
sourceimpl Clone for TodoRBuilder
impl Clone for TodoRBuilder
sourcefn clone(&self) -> TodoRBuilder
fn clone(&self) -> TodoRBuilder
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more