Skip to main content

MergedTreeValueExt

Trait MergedTreeValueExt 

Source
pub trait MergedTreeValueExt {
    // Required methods
    fn is_tree(&self) -> bool;
    fn is_file_like(&self) -> bool;
    fn to_file_merge(&self) -> Option<Merge<Option<FileId>>>;
    fn to_executable_merge(&self) -> Option<Merge<Option<bool>>>;
    fn to_copy_id_merge(&self) -> Option<Merge<Option<CopyId>>>;
    fn with_new_file_ids(
        &self,
        file_ids: &Merge<Option<FileId>>,
    ) -> Merge<Option<TreeValue>>;
    fn describe(&self, labels: &ConflictLabels) -> String;
}
Expand description

Extension methods for tree-value merges such as MergedTreeValue and MergedTreeVal.

Required Methods§

Source

fn is_tree(&self) -> bool

Whether this merge should be recursed into when doing directory walks.

Source

fn is_file_like(&self) -> bool

Whether this merge is present and not a tree

Source

fn to_file_merge(&self) -> Option<Merge<Option<FileId>>>

If this merge contains only files or absent entries, returns a merge of the FileIds. The executable bits and copy IDs will be ignored. Use Merge::with_new_file_ids() to produce a new merge with the original executable bits preserved.

Source

fn to_executable_merge(&self) -> Option<Merge<Option<bool>>>

If this merge contains only files or absent entries, returns a merge of the files’ executable bits.

Source

fn to_copy_id_merge(&self) -> Option<Merge<Option<CopyId>>>

If this merge contains only files or absent entries, returns a merge of the files’ copy IDs.

Source

fn with_new_file_ids( &self, file_ids: &Merge<Option<FileId>>, ) -> Merge<Option<TreeValue>>

Creates a new merge with the file ids from the given merge. In other words, the executable bits and copy IDs from self will be preserved.

The given file_ids should have the same shape as self. Only the FileId values may differ.

Source

fn describe(&self, labels: &ConflictLabels) -> String

Give a summary description of the conflict’s “removes” and “adds”

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§