pub struct MergeConflict { /* private fields */ }
Expand description
Structure representing an individual merge conflict
Implementations§
source§impl MergeConflict
impl MergeConflict
sourcepub fn base_snapshot(&self) -> Option<Snapshot>
pub fn base_snapshot(&self) -> Option<Snapshot>
Snapshot which is the parent of the two being merged
sourcepub fn first_snapshot(&self) -> Option<Snapshot>
pub fn first_snapshot(&self) -> Option<Snapshot>
First snapshot being merged
sourcepub fn second_snapshot(&self) -> Option<Snapshot>
pub fn second_snapshot(&self) -> Option<Snapshot>
Second snapshot being merged
pub fn path_item_string<S: BnStrCompatible>( &self, path: S, ) -> Result<BnString, ()>
sourcepub fn base_file(&self) -> Option<Ref<FileMetadata>>
pub fn base_file(&self) -> Option<Ref<FileMetadata>>
FileMetadata with contents of file for base snapshot This function is slow! Only use it if you really need it.
sourcepub fn first_file(&self) -> Option<Ref<FileMetadata>>
pub fn first_file(&self) -> Option<Ref<FileMetadata>>
FileMetadata with contents of file for first snapshot This function is slow! Only use it if you really need it.
sourcepub fn second_file(&self) -> Option<Ref<FileMetadata>>
pub fn second_file(&self) -> Option<Ref<FileMetadata>>
FileMetadata with contents of file for second snapshot This function is slow! Only use it if you really need it.
sourcepub fn second(&self) -> Option<BnString>
pub fn second(&self) -> Option<BnString>
Json object for conflicting data in the second snapshot
sourcepub fn data_type(&self) -> MergeConflictDataType
pub fn data_type(&self) -> MergeConflictDataType
Type of data in the conflict, Text/Json/Binary
sourcepub fn conflict_type(&self) -> BnString
pub fn conflict_type(&self) -> BnString
String representing the type name of the data, not the same as data_type. This is like “typeName” or “tag” depending on what object the conflict represents.
sourcepub fn key(&self) -> BnString
pub fn key(&self) -> BnString
Lookup key for the merge conflict, ideally a tree path that contains the name of the conflict and all the recursive children leading up to this conflict.
sourcepub fn success<S: BnStrCompatible>(&self, value: S) -> Result<(), ()>
pub fn success<S: BnStrCompatible>(&self, value: S) -> Result<(), ()>
Call this when you’ve resolved the conflict to save the result