Trait mit_commit_message_lints::external::Vcs
source · pub trait Vcs {
fn entries(&self, glob: Option<&str>) -> Result<Vec<String>>;
fn get_bool(&self, name: &str) -> Result<Option<bool>>;
fn get_str(&self, name: &str) -> Result<Option<&str>>;
fn get_i64(&self, name: &str) -> Result<Option<i64>>;
fn set_str(&mut self, name: &str, value: &str) -> Result<()>;
fn set_i64(&mut self, name: &str, value: i64) -> Result<()>;
fn remove(&mut self, name: &str) -> Result<()>;
}
Expand description
A wrapper around accessing different values from a VCS config
Required Methods§
sourcefn entries(&self, glob: Option<&str>) -> Result<Vec<String>>
fn entries(&self, glob: Option<&str>) -> Result<Vec<String>>
Errors
If we can’t read the config, or it’s not parsable into a bool
sourcefn get_bool(&self, name: &str) -> Result<Option<bool>>
fn get_bool(&self, name: &str) -> Result<Option<bool>>
Errors
If we can’t read the config, or it’s not parsable into a bool
sourcefn get_str(&self, name: &str) -> Result<Option<&str>>
fn get_str(&self, name: &str) -> Result<Option<&str>>
Errors
If we can’t read the config, or it’s not parsable into a &str
sourcefn get_i64(&self, name: &str) -> Result<Option<i64>>
fn get_i64(&self, name: &str) -> Result<Option<i64>>
Errors
If we can’t read the config, or it’s not parsable into a i64
sourcefn set_str(&mut self, name: &str, value: &str) -> Result<()>
fn set_str(&mut self, name: &str, value: &str) -> Result<()>
Errors
If the config fails to write