pub struct Config {
pub tags: Vec<String>,
pub include: Vec<String>,
pub exclude: Vec<String>,
pub json: bool,
pub flat: bool,
pub no_color: bool,
pub custom_pattern: Option<String>,
pub ignore_case: bool,
pub require_colon: bool,
}Fields§
§include: Vec<String>§exclude: Vec<String>§json: bool§flat: bool§no_color: bool§custom_pattern: Option<String>§ignore_case: bool§require_colon: boolImplementations§
Source§impl Config
impl Config
pub fn new() -> Self
Sourcepub fn load(start_path: &Path) -> Result<Option<Self>>
pub fn load(start_path: &Path) -> Result<Option<Self>>
Load configuration from a .todorc file
Searches for configuration files in the following order:
- .todorc in the current directory
- .todorc.json in the current directory
- .todorc.yaml or .todorc.yml in the current directory
- ~/.config/todo-tree/config.json (global config)
pub fn load_from_file(path: &Path) -> Result<Self>
pub fn merge_with_cli(&mut self, cli: CliOptions)
pub fn save(&self, path: &Path) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more