Struct dogear::MergeState [−][src]
pub struct MergeState<'t>(_, _);
The merge state indicates which node we should prefer, local or remote, when resolving conflicts.
Methods
impl<'t> MergeState<'t>
[src]
impl<'t> MergeState<'t>
pub fn local(node: Node<'t>) -> MergeState<'t>
[src]
pub fn local(node: Node<'t>) -> MergeState<'t>
A local merge state means no changes: we keep the local value and structure state. This could mean that the item doesn't exist on the server yet, or that it has newer local changes that we should upload.
pub fn remote(node: Node<'t>) -> MergeState<'t>
[src]
pub fn remote(node: Node<'t>) -> MergeState<'t>
A remote merge state means we should update the local value and structure state. The item might not exist locally yet, or might have newer remote changes that we should apply.
pub fn new(old: MergeState<'t>) -> MergeState<'t>
[src]
pub fn new(old: MergeState<'t>) -> MergeState<'t>
Takes an existing value state, and a new structure state. We use the new merge state to resolve conflicts caused by moving local items out of a remotely deleted folder, or remote items out of a locally deleted folder.
New merged nodes should be reuploaded to the server.
pub fn value(&self) -> ValueState
[src]
pub fn value(&self) -> ValueState
pub fn structure(&self) -> StructureState
[src]
pub fn structure(&self) -> StructureState
Trait Implementations
impl<'t> Clone for MergeState<'t>
[src]
impl<'t> Clone for MergeState<'t>
fn clone(&self) -> MergeState<'t>
[src]
fn clone(&self) -> MergeState<'t>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'t> Copy for MergeState<'t>
[src]
impl<'t> Copy for MergeState<'t>
impl<'t> Debug for MergeState<'t>
[src]
impl<'t> Debug for MergeState<'t>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'t> Display for MergeState<'t>
[src]
impl<'t> Display for MergeState<'t>
Auto Trait Implementations
impl<'t> Send for MergeState<'t>
impl<'t> Send for MergeState<'t>
impl<'t> Sync for MergeState<'t>
impl<'t> Sync for MergeState<'t>