pub trait TreeMergeExt: Sized {
// Required methods
fn dir(&self) -> &RepoPath;
fn value(&self, basename: &RepoPathComponent) -> MergedTreeVal<'_>;
async fn sub_tree(
&self,
name: &RepoPathComponent,
) -> BackendResult<Option<Self>>;
async fn sub_tree_recursive(
&self,
path: &RepoPath,
) -> BackendResult<Option<Self>>;
}Expand description
Extension methods for Merge<Tree>.
Required Methods§
Sourcefn value(&self, basename: &RepoPathComponent) -> MergedTreeVal<'_>
fn value(&self, basename: &RepoPathComponent) -> MergedTreeVal<'_>
The value at the given basename. The value can be Resolved even if
self is conflicted, which happens if the value at the path can be
trivially merged. Does not recurse, so if basename refers to a Tree,
then a TreeValue::Tree will be returned.
Sourceasync fn sub_tree(
&self,
name: &RepoPathComponent,
) -> BackendResult<Option<Self>>
async fn sub_tree( &self, name: &RepoPathComponent, ) -> BackendResult<Option<Self>>
Gets the Merge<Tree> in a subdirectory of the current tree. If the
path doesn’t correspond to a tree in any of the inputs to the merge,
then that entry will be replaced by an empty tree in the result.
Sourceasync fn sub_tree_recursive(
&self,
path: &RepoPath,
) -> BackendResult<Option<Self>>
async fn sub_tree_recursive( &self, path: &RepoPath, ) -> BackendResult<Option<Self>>
Look up the tree at the given path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".