pub struct Config { /* private fields */ }Implementations§
Source§impl Config
Auto-generated by derive_getters::Getters.
impl Config
Auto-generated by derive_getters::Getters.
Sourcepub fn semver_release(&self) -> &Option<SemverRelease>
pub fn semver_release(&self) -> &Option<SemverRelease>
Get field semver_release from instance of Config.
Sourcepub fn pre_commit(&self) -> &Option<PreCommit>
pub fn pre_commit(&self) -> &Option<PreCommit>
Get field pre_commit from instance of Config.
Sourcepub fn github_workflows(&self) -> &Option<GithubWorkflows>
pub fn github_workflows(&self) -> &Option<GithubWorkflows>
Get field github_workflows from instance of Config.
Sourcepub fn commitalyzer(&self) -> &Option<Commitalyzer>
pub fn commitalyzer(&self) -> &Option<Commitalyzer>
Get field commitalyzer from instance of Config.
Sourcepub fn cargo_deny(&self) -> &Option<CargoDeny>
pub fn cargo_deny(&self) -> &Option<CargoDeny>
Get field cargo_deny from instance of Config.
Source§impl Config
impl Config
pub fn set_path(self, value: PathBuf) -> Self
pub fn set_vhooks(self, value: Option<Vhooks>) -> Self
pub fn set_semver_release(self, value: Option<SemverRelease>) -> Self
pub fn set_pre_commit(self, value: Option<PreCommit>) -> Self
pub fn set_licenses(self, value: Option<Licenses>) -> Self
pub fn set_github_workflows(self, value: Option<GithubWorkflows>) -> Self
pub fn set_commitalyzer(self, value: Option<Commitalyzer>) -> Self
pub fn set_cargo_deny(self, value: Option<CargoDeny>) -> Self
Source§impl Config
impl Config
pub fn new( path: PathBuf, vhooks: Option<Vhooks>, semver_release: Option<SemverRelease>, pre_commit: Option<PreCommit>, licenses: Option<Licenses>, github_workflows: Option<GithubWorkflows>, commitalyzer: Option<Commitalyzer>, cargo_deny: Option<CargoDeny>, ) -> Self
pub fn new_empty(dest: &Path) -> Self
pub fn on_all<F>(&mut self, f: F)
pub fn try_all<F>(&mut self, f: F) -> Result<(), SolarError>
Sourcepub fn load_from_file(file_path: &Path) -> Result<Self, SolarError>
pub fn load_from_file(file_path: &Path) -> Result<Self, SolarError>
Creates a new Config from a file at the supplied path, provided the file contains valid syntax for JSON and the config.
pub fn load_from(file_path: &Path) -> Result<Self, SolarError>
pub fn load_or_default(file_path: &Path) -> Self
pub fn save_to_file(&self, file_path: &Path) -> Result<(), SolarError>
pub fn save_to(&self, file_path: &Path) -> Result<(), SolarError>
pub fn save(&self) -> Result<(), SolarError>
pub fn is_empty(&self) -> bool
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