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
pub unsafe fn get_path_item_number(&self, path_key: &str) -> Option<u64>
pub unsafe fn get_path_item_string(&self, path_key: &str) -> Option<BnString>
Trait Implementations§
Source§impl CoreArrayProvider for MergeConflict
impl CoreArrayProvider for MergeConflict
Source§impl ToOwned for MergeConflict
impl ToOwned for MergeConflict
Source§type Owned = Ref<MergeConflict>
type Owned = Ref<MergeConflict>
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Auto Trait Implementations§
impl Freeze for MergeConflict
impl RefUnwindSafe for MergeConflict
impl !Send for MergeConflict
impl !Sync for MergeConflict
impl Unpin for MergeConflict
impl UnsafeUnpin for MergeConflict
impl UnwindSafe for MergeConflict
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more