pub struct MapMerge<'a, S: Store> { /* private fields */ }Expand description
A three-way merge pinned to a base, current head, and candidate version.
Implementations§
Source§impl<'a, S: Store> MapMerge<'a, S>
impl<'a, S: Store> MapMerge<'a, S>
Sourcepub fn base(&self) -> &MapVersion
pub fn base(&self) -> &MapVersion
Common ancestor selected for the merge.
Sourcepub fn head(&self) -> &MapVersion
pub fn head(&self) -> &MapVersion
Head that must still be current when publishing.
Sourcepub fn candidate(&self) -> &MapVersion
pub fn candidate(&self) -> &MapVersion
Candidate version whose changes are being merged.
Sourcepub fn stream_conflicts<'s>(
&'s self,
) -> Result<Box<dyn Iterator<Item = Result<Conflict, Error>> + 's>, Error>
pub fn stream_conflicts<'s>( &'s self, ) -> Result<Box<dyn Iterator<Item = Result<Conflict, Error>> + 's>, Error>
Lazily stream conflicts without constructing a merged tree.
Sourcepub fn merge(&self, resolver: Option<Resolver>) -> Result<Tree, Error>
pub fn merge(&self, resolver: Option<Resolver>) -> Result<Tree, Error>
Build the merged tree without moving head.
Sourcepub fn merge_with_policy(
&self,
policies: &MergePolicyRegistry,
) -> Result<Tree, Error>
pub fn merge_with_policy( &self, policies: &MergePolicyRegistry, ) -> Result<Tree, Error>
Build a merged tree using a prefix/exact-key policy registry.
Sourcepub fn crdt_merge(&self, config: &CrdtConfig) -> Result<Tree, Error>
pub fn crdt_merge(&self, config: &CrdtConfig) -> Result<Tree, Error>
Build a conflict-free merged tree using CRDT semantics.
Sourcepub fn crdt_merge_explain(&self, config: &CrdtConfig) -> MergeExplanation
pub fn crdt_merge_explain(&self, config: &CrdtConfig) -> MergeExplanation
Build a conflict-free merged tree and retain engine diagnostics.
Sourcepub fn publish(
&self,
resolver: Option<Resolver>,
) -> Result<VersionedMapUpdate, Error>where
S: ManifestStore + TransactionalStore,
pub fn publish(
&self,
resolver: Option<Resolver>,
) -> Result<VersionedMapUpdate, Error>where
S: ManifestStore + TransactionalStore,
Merge and publish only if the pinned head is still current.
Sourcepub fn publish_with_policy(
&self,
policies: &MergePolicyRegistry,
) -> Result<VersionedMapUpdate, Error>where
S: ManifestStore + TransactionalStore,
pub fn publish_with_policy(
&self,
policies: &MergePolicyRegistry,
) -> Result<VersionedMapUpdate, Error>where
S: ManifestStore + TransactionalStore,
Merge with policies and CAS-publish the result.
Sourcepub fn publish_crdt(
&self,
config: &CrdtConfig,
) -> Result<VersionedMapUpdate, Error>where
S: ManifestStore + TransactionalStore,
pub fn publish_crdt(
&self,
config: &CrdtConfig,
) -> Result<VersionedMapUpdate, Error>where
S: ManifestStore + TransactionalStore,
CRDT-merge and CAS-publish the result.
Auto Trait Implementations§
impl<'a, S> Freeze for MapMerge<'a, S>
impl<'a, S> RefUnwindSafe for MapMerge<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for MapMerge<'a, S>
impl<'a, S> Sync for MapMerge<'a, S>
impl<'a, S> Unpin for MapMerge<'a, S>
impl<'a, S> UnsafeUnpin for MapMerge<'a, S>
impl<'a, S> UnwindSafe for MapMerge<'a, S>where
S: RefUnwindSafe,
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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