pub struct Tree {Show 14 fields
pub commands: Vec<MultiVariable>,
pub environment: Vec<MultiVariable>,
pub gitconfig: Vec<NamedVariable>,
pub remotes: Vec<NamedVariable>,
pub symlink: Variable,
pub templates: Vec<String>,
pub variables: Vec<NamedVariable>,
pub branch: Variable,
pub worktree: Variable,
pub clone_depth: i64,
pub is_single_branch: bool,
pub is_symlink: bool,
pub is_bare_repository: bool,
pub is_worktree: bool,
/* private fields */
}
Expand description
Trees represent a single worktree
Fields§
§commands: Vec<MultiVariable>
§environment: Vec<MultiVariable>
§gitconfig: Vec<NamedVariable>
§remotes: Vec<NamedVariable>
§symlink: Variable
§templates: Vec<String>
§variables: Vec<NamedVariable>
§branch: Variable
§worktree: Variable
§clone_depth: i64
§is_single_branch: bool
§is_symlink: bool
§is_bare_repository: bool
§is_worktree: bool
Implementations§
source§impl Tree
impl Tree
pub fn get_name(&self) -> &String
pub fn get_name_mut(&mut self) -> &mut String
pub fn get_path(&self) -> &Variable
pub fn get_path_mut(&mut self) -> &mut Variable
pub fn path_is_valid(&self) -> bool
sourcepub fn canonical_pathbuf(&self) -> Option<PathBuf>
pub fn canonical_pathbuf(&self) -> Option<PathBuf>
Build a canonicalized pathbuf for the current tree.
pub fn path_as_ref(&self) -> Result<&String, GardenError>
pub fn symlink_as_ref(&self) -> Result<&String, GardenError>
pub fn reset_variables(&self)
sourcepub fn clone_from_tree(&mut self, tree: &Tree, clone_variables: bool)
pub fn clone_from_tree(&mut self, tree: &Tree, clone_variables: bool)
Copy the guts of another tree into the current tree.
sourcepub fn update_flags(&mut self)
pub fn update_flags(&mut self)
Update internal flags in response to newly read data.