pub trait ConfigWrite {
// Required methods
fn set(
&mut self,
key: impl AsRef<str>,
value: impl Into<ConfigValue>,
) -> Result<()>;
fn remove(&mut self, key: impl AsRef<str>) -> Result<()>;
fn set_multivar(
&mut self,
key: impl AsRef<str>,
regex: impl AsRef<str>,
value: impl AsRef<str>,
) -> Result<()>;
fn remove_multivar(
&mut self,
key: impl AsRef<str>,
regex: impl AsRef<str>,
) -> Result<()>;
}
Expand description
Write-only interface to Git’s configuration.
Required Methods§
Sourcefn set(
&mut self,
key: impl AsRef<str>,
value: impl Into<ConfigValue>,
) -> Result<()>
fn set( &mut self, key: impl AsRef<str>, value: impl Into<ConfigValue>, ) -> Result<()>
Set the given config key to the given value.
Sourcefn remove(&mut self, key: impl AsRef<str>) -> Result<()>
fn remove(&mut self, key: impl AsRef<str>) -> Result<()>
Remove the given key from the configuration.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.