pub struct MetaConfig {
pub ignore: Vec<String>,
pub projects: HashMap<String, ProjectEntry>,
pub plugins: Option<HashMap<String, String>>,
pub nested: Option<NestedConfig>,
pub aliases: Option<HashMap<String, String>>,
pub scripts: Option<HashMap<String, String>>,
pub worktree_init: Option<String>,
pub default_bare: Option<bool>,
}Expand description
The .meta file configuration format
Fields§
§ignore: Vec<String>§projects: HashMap<String, ProjectEntry>§plugins: Option<HashMap<String, String>>§nested: Option<NestedConfig>§aliases: Option<HashMap<String, String>>§scripts: Option<HashMap<String, String>>§worktree_init: Option<String>§default_bare: Option<bool>Implementations§
Source§impl MetaConfig
impl MetaConfig
pub fn load_from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn find_meta_file() -> Option<PathBuf>
pub fn load() -> Result<Self>
Sourcepub fn get_project_url(&self, project_name: &str) -> Option<String>
pub fn get_project_url(&self, project_name: &str) -> Option<String>
Get the URL for a project (handles both string and metadata formats)
Sourcepub fn get_project_scripts(
&self,
project_name: &str,
) -> Option<HashMap<String, String>>
pub fn get_project_scripts( &self, project_name: &str, ) -> Option<HashMap<String, String>>
Get scripts for a specific project
Sourcepub fn get_all_scripts(
&self,
project_name: Option<&str>,
) -> HashMap<String, String>
pub fn get_all_scripts( &self, project_name: Option<&str>, ) -> HashMap<String, String>
Get all available scripts (project-specific and global)
Sourcepub fn project_exists(&self, project_name: &str) -> bool
pub fn project_exists(&self, project_name: &str) -> bool
Check if a project exists (for backwards compatibility)
Sourcepub fn get_worktree_init(&self, project_name: &str) -> Option<String>
pub fn get_worktree_init(&self, project_name: &str) -> Option<String>
Get the worktree_init command for a project (project-level overrides global)
Sourcepub fn is_bare_repo(&self, project_name: &str) -> bool
pub fn is_bare_repo(&self, project_name: &str) -> bool
Get whether a project should use bare repository
Trait Implementations§
Source§impl Clone for MetaConfig
impl Clone for MetaConfig
Source§fn clone(&self) -> MetaConfig
fn clone(&self) -> MetaConfig
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 MetaConfig
impl Debug for MetaConfig
Source§impl Default for MetaConfig
impl Default for MetaConfig
Source§impl<'de> Deserialize<'de> for MetaConfig
impl<'de> Deserialize<'de> for MetaConfig
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 MetaConfig
impl RefUnwindSafe for MetaConfig
impl Send for MetaConfig
impl Sync for MetaConfig
impl Unpin for MetaConfig
impl UnsafeUnpin for MetaConfig
impl UnwindSafe for MetaConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more