pub struct CopyOutcome {
pub source: GlobalId,
pub action: CopyAction,
pub placed: Option<Placement>,
}Expand description
What happened to one item.
action and destination are one value rather than two fields side by side: an
updated item without a destination id, or an orphan without one, are states this type
must not be able to say — the id is what those outcomes are about. The one outcome
that legitimately has none is a dry run that would create, because nothing was
created and there is no id to report.
Fields§
§source: GlobalIdThe qualified id the item was read from.
action: CopyActionWhat happened to it, and where.
placed: Option<Placement>Which source a routed copy placed it in, and the index of the route entry that
matched — null there when none did.
Present for every item a copy into a source declaring routes landed, a dry run’s
included, so a would-be create still says where it would go; absent for a copy into
a source with none, whose output is what it always was, and for an orphan, which was
not placed at all.
Implementations§
Source§impl CopyOutcome
impl CopyOutcome
Sourcepub fn destination(&self) -> Option<&GlobalId>
pub fn destination(&self) -> Option<&GlobalId>
The qualified id this outcome landed on, when it landed on one.
Trait Implementations§
Source§impl Clone for CopyOutcome
impl Clone for CopyOutcome
Source§impl Debug for CopyOutcome
impl Debug for CopyOutcome
Source§impl<'de> Deserialize<'de> for CopyOutcome
impl<'de> Deserialize<'de> for CopyOutcome
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>,
Source§impl JsonSchema for CopyOutcome
impl JsonSchema for CopyOutcome
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more