pub trait Vcs {
// Required methods
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<()>;
fn state(&self) -> Option<RepoState>;
}
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 an 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