pub struct Config {
pub roots: Vec<String>,
}Expand description
The .ct/okf.jsonc project config: the explicit list of content roots
(project-relative keys).
Fields§
§roots: Vec<String>Implementations§
Source§impl Config
impl Config
Sourcepub fn load(project: &Path) -> Result<Config, String>
pub fn load(project: &Path) -> Result<Config, String>
Load the config, or an empty one when the file is absent. A malformed file is an error (so a typo is surfaced, not silently ignored).
Sourcepub fn save(&self, project: &Path) -> Result<(), String>
pub fn save(&self, project: &Path) -> Result<(), String>
Write the config (creating .ct/ if needed), sorted and de-duplicated.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
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