[−][src]Enum dogear::MergeState
The merge state indicates which node we should prefer, local or remote, when resolving conflicts.
Variants
LocalOnly(Node<'t>)
A local-only merge state means the item only exists locally, and should be uploaded.
RemoteOnly(Node<'t>)
A remote-only merge state means the item only exists remotely, and should be applied.
Local
A local merge state means the item exists on both sides, and has newer local changes that should be uploaded.
Fields of Local
Remote
A remote merge state means the item exists on both sides, and has newer remote changes that should be applied.
Fields of Remote
RemoteOnlyWithNewStructure(Node<'t>)
A remote-only merge state with new structure means the item only exists remotely, and has a new merged structure that should be reuploaded. We use new structure states to resolve conflicts caused by moving local items out of a remotely deleted folder, moving remote items out of a locally deleted folder, or merging divergent items.
RemoteWithNewStructure
A remote merge state with new structure means the item exists on both sides, has newer remote changes, and new structure that should be reuploaded.
Fields of RemoteWithNewStructure
Unchanged
An unchanged merge state means the item didn't change on either side, and doesn't need to be uploaded or applied.
Fields of Unchanged
Methods
impl<'t> MergeState<'t>
[src]
pub fn local_node(&self) -> Option<&Node<'t>>
[src]
Returns the local node for the item, or None
if the item only exists
remotely. The inverse of remote_node()
.
pub fn remote_node(&self) -> Option<&Node<'t>>
[src]
Returns the remote node for the item, or None
if the node only exists
locally. The inverse of local_node()
.
pub fn should_apply(&self) -> bool
[src]
Returns true
if the remote item should be inserted into or updated
in the local tree. This is not necessarily the inverse of
should_upload()
, as remote items with new structure should be both
applied and reuploaded, and unchanged items should be neither.
pub fn upload_reason(&self) -> UploadReason
[src]
Returns the reason for (re)uploading this node.
Trait Implementations
impl<'t> Copy for MergeState<'t>
[src]
impl<'t> Clone for MergeState<'t>
[src]
fn clone(&self) -> MergeState<'t>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'t> Debug for MergeState<'t>
[src]
impl<'t> Display for MergeState<'t>
[src]
Auto Trait Implementations
impl<'t> Send for MergeState<'t>
impl<'t> Sync for MergeState<'t>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,