pub struct RepoConfig {
pub name: Option<String>,
pub database: Option<DatabaseConfig>,
pub hooks: Option<HooksConfig>,
pub env: Option<BTreeMap<String, String>>,
}Fields§
§name: Option<String>§database: Option<DatabaseConfig>§hooks: Option<HooksConfig>§env: Option<BTreeMap<String, String>>Implementations§
Source§impl RepoConfig
impl RepoConfig
pub fn load_from_dir(dir: &Path) -> Result<Option<Self>, Error>
Sourcepub fn discover(path: &Path) -> Result<Option<(Self, PathBuf)>, Error>
pub fn discover(path: &Path) -> Result<Option<(Self, PathBuf)>, Error>
Walk up from path looking for .grove/config.toml.
Returns (config, repo_root) where the second element is the main repo root.
When .git is a file (git worktree) or .jj/repo is a symlink (jj workspace),
resolves back to the main repo root.
pub fn effective_name(&self, repo_root: &Path) -> String
Trait Implementations§
Source§impl Clone for RepoConfig
impl Clone for RepoConfig
Source§fn clone(&self) -> RepoConfig
fn clone(&self) -> RepoConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RepoConfig
impl Debug for RepoConfig
Source§impl Default for RepoConfig
impl Default for RepoConfig
Source§fn default() -> RepoConfig
fn default() -> RepoConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RepoConfig
impl<'de> Deserialize<'de> for RepoConfig
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 RepoConfig
impl RefUnwindSafe for RepoConfig
impl Send for RepoConfig
impl Sync for RepoConfig
impl Unpin for RepoConfig
impl UnwindSafe for RepoConfig
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