Struct gitcc_core::Config
source · pub struct Config {
pub commit: CommitConfig,
pub version: VersioningConfig,
pub changelog: ChangelogConfig,
}
Expand description
Configuration
Fields§
§commit: CommitConfig
Commit configuration
version: VersioningConfig
Versioning configuration
changelog: ChangelogConfig
Changelog configuration
Implementations§
source§impl Config
impl Config
sourcepub fn load_from_fs(cwd: &Path) -> Result<Option<Self>, Error>
pub fn load_from_fs(cwd: &Path) -> Result<Option<Self>, Error>
Loads the configuration from a file system
The configuration is looked into the parent git repo.
sourcepub fn save_to_fs(&self, cwd: &Path, overwrite: bool) -> Result<(), Error>
pub fn save_to_fs(&self, cwd: &Path, overwrite: bool) -> Result<(), Error>
Saves the file to the file system
The file is saved relative to the workdir of the parent git repo.
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 RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin 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