pub enum CopyAction {
Created {
destination: Option<GlobalId>,
},
Updated {
destination: GlobalId,
},
Unchanged {
destination: GlobalId,
},
Orphaned {
destination: GlobalId,
},
}Expand description
The four things a copy can do to one item, and the id each of them is about.
Variants§
Created
The destination held no counterpart, so one was created.
Fields
Updated
The destination held a counterpart and it now reads as the source does.
Unchanged
The destination held a counterpart that already read that way; nothing was written.
Orphaned
The destination holds a counterpart the source no longer does. A copy never deletes, so it was left exactly as it is.
Implementations§
Source§impl CopyAction
impl CopyAction
Sourcepub fn destination(&self) -> Option<&GlobalId>
pub fn destination(&self) -> Option<&GlobalId>
The qualified id this action is about, when there is one.
Sourcepub fn name(&self) -> String
pub fn name(&self) -> String
The word this action serializes as, taken from its own Serialize.
Read back off the wire form rather than written out again in a match, for the
reason render::wire gives: a second spelling of unchanged would be a second
place for it to drift from the one a caller reads.
Trait Implementations§
Source§impl Clone for CopyAction
impl Clone for CopyAction
Source§fn clone(&self) -> CopyAction
fn clone(&self) -> CopyAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CopyAction
impl Debug for CopyAction
Source§impl<'de> Deserialize<'de> for CopyAction
impl<'de> Deserialize<'de> for CopyAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for CopyAction
impl JsonSchema for CopyAction
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CopyAction
impl PartialEq for CopyAction
Source§impl Serialize for CopyAction
impl Serialize for CopyAction
impl StructuralPartialEq for CopyAction
Auto Trait Implementations§
impl Freeze for CopyAction
impl RefUnwindSafe for CopyAction
impl Send for CopyAction
impl Sync for CopyAction
impl Unpin for CopyAction
impl UnsafeUnpin for CopyAction
impl UnwindSafe for CopyAction
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