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(&self, path: &str) -> 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) -> String
pub fn conflict_type(&self) -> String
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) -> String
pub fn key(&self) -> String
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(&self, value: &str) -> Result<(), ()>
pub fn success(&self, value: &str) -> Result<(), ()>
Call this when you’ve resolved the conflict to save the result