Enum vstorage::sync::plan::ItemAction
source · pub enum ItemAction<I: Item> {
SaveToStatus {
a: ItemState<I>,
b: ItemState<I>,
},
UpdateStatus {
hash: String,
old_a: ItemRef,
old_b: ItemRef,
new_a: ItemRef,
new_b: ItemRef,
},
ClearStatus {
uid: String,
},
Create {
side: Side,
source: ItemState<I>,
},
Update {
side: Side,
source: ItemState<I>,
target: Href,
old_a: ItemRef,
old_b: ItemRef,
},
Delete {
side: Side,
target: ItemState<I>,
},
Conflict {
a: ItemState<I>,
b: ItemState<I>,
is_new: bool,
},
}
Expand description
Operation to execute on an item during synchronising.
Variants§
SaveToStatus
Item is new and identical on both sides.
UpdateStatus
Item has changed and is identical on both sides.
Fields
ClearStatus
Item is gone from both sides but still present in status db.
Create
Update
Delete
Conflict
Item is in conflict which needs to be resolved externally.
Trait Implementations§
source§impl<I: Clone + Item> Clone for ItemAction<I>
impl<I: Clone + Item> Clone for ItemAction<I>
source§fn clone(&self) -> ItemAction<I>
fn clone(&self) -> ItemAction<I>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<I: Item> Display for ItemAction<I>
impl<I: Item> Display for ItemAction<I>
impl<I: Item> StructuralPartialEq for ItemAction<I>
Auto Trait Implementations§
impl<I> Freeze for ItemAction<I>where
I: Freeze,
impl<I> RefUnwindSafe for ItemAction<I>where
I: RefUnwindSafe,
impl<I> Send for ItemAction<I>
impl<I> Sync for ItemAction<I>
impl<I> Unpin for ItemAction<I>where
I: Unpin,
impl<I> UnwindSafe for ItemAction<I>where
I: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.