binaryninja::collaboration

Struct MergeConflict

source
pub struct MergeConflict { /* private fields */ }
Expand description

Structure representing an individual merge conflict

Implementations§

source§

impl MergeConflict

source

pub fn database(&self) -> Database

Database backing all snapshots in the merge conflict

source

pub fn base_snapshot(&self) -> Option<Snapshot>

Snapshot which is the parent of the two being merged

source

pub fn first_snapshot(&self) -> Option<Snapshot>

First snapshot being merged

source

pub fn second_snapshot(&self) -> Option<Snapshot>

Second snapshot being merged

source

pub fn path_item_string<S: BnStrCompatible>( &self, path: S, ) -> Result<BnString, ()>

source

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.

source

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.

source

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.

source

pub fn base(&self) -> Option<BnString>

Json String for conflicting data in the base snapshot

source

pub fn first(&self) -> Option<BnString>

Json object for conflicting data in the base snapshot

source

pub fn second(&self) -> Option<BnString>

Json object for conflicting data in the second snapshot

source

pub fn data_type(&self) -> MergeConflictDataType

Type of data in the conflict, Text/Json/Binary

source

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.

source

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.

source

pub fn success<S: BnStrCompatible>(&self, value: S) -> Result<(), ()>

Call this when you’ve resolved the conflict to save the result

source

pub unsafe fn get_path_item_number<S: BnStrCompatible>( &self, path_key: S, ) -> Option<u64>

source

pub unsafe fn get_path_item_string<S: BnStrCompatible>( &self, path_key: S, ) -> Option<BnString>

Trait Implementations§

source§

impl CoreArrayProvider for MergeConflict

source§

impl ToOwned for MergeConflict

source§

type Owned = Ref<MergeConflict>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.