pub enum EngineError {
Show 43 variants
UnknownSource {
name: String,
configured: String,
},
Token {
message: String,
},
NoSources,
NotWritable {
name: String,
kind: String,
},
NoDocuments {
name: String,
kind: String,
},
NoComments {
name: String,
kind: String,
},
CommentsNotWritable {
name: String,
kind: String,
},
StatusNotWritable {
name: String,
kind: String,
},
MetadataNotWritable {
name: String,
kind: String,
record: MetadataRecord,
},
PriorityNotWritable {
name: String,
kind: String,
},
ContentNotWritable {
name: String,
kind: String,
},
UpdateNotWritable {
name: String,
kind: String,
},
AssetNotReferenced {
record: String,
asset: String,
},
AssetNotGiven {
record: String,
asset: String,
},
AssetGivenTwice {
record: String,
asset: String,
},
AssetsUnsupported {
name: String,
kind: String,
record: String,
asset: String,
},
AssetNotHeld {
record: String,
asset: String,
},
NotCreatable {
name: String,
kind: String,
record: MetadataRecord,
},
RenderingNotWritable {
name: String,
kind: String,
record: RenderedRecord,
},
MissingAnswers {
id: String,
names: Vec<String>,
reason: String,
},
Template {
error: TemplateError,
},
NoStoredAnswers {
record: RenderedRecord,
id: String,
reason: String,
},
NoTemplate {
record: RenderedRecord,
id: String,
},
MalformedProvenance {
record: RenderedRecord,
id: String,
problem: String,
},
TemplateNotAFile {
record: RenderedRecord,
id: String,
reference: String,
},
NoPriority {
name: String,
kind: String,
task: String,
priority: Priority,
},
NoSuchProject {
id: String,
},
NoSuchDocument {
id: String,
},
NoSuchTask {
id: String,
},
NoSuchComment {
task: String,
comment: String,
},
SourceUnavailable {
name: String,
error: SourceError,
},
SourceFailed {
name: String,
error: SourceError,
},
DestinationUnavailable {
name: String,
error: SourceError,
},
NoSuchItem {
id: String,
},
StaleOrigin {
item: String,
origin: String,
},
StaleLink {
item: String,
link: String,
},
CreateWith {
flag: CopyLookup,
},
CreateCarried {
item: GlobalId,
carrier: GlobalId,
},
NotAMember {
id: GlobalId,
projects: Vec<GlobalId>,
},
UnrecordedMember {
item: GlobalId,
member: GlobalId,
destination: SourceName,
},
Misrouted {
item: GlobalId,
counterpart: GlobalId,
route: SourceName,
},
SourceRefused {
name: String,
error: SourceError,
},
CopyNotUndone {
error: Box<EngineError>,
left_behind: LeftBehind,
refusal: SourceError,
},
}Expand description
What the engine refuses before it asks any source.
Distinct from a SourceFailure, which is one source failing while the others
answer: everything here means the request itself cannot be run at all.
Eq is deliberately absent: three variants carry the SourceError the source
itself gave, which is what a user has to act on, and that type is PartialEq alone.
Variants§
UnknownSource
A --source named something no configuration configures.
Fields
Token
A --page token that decodes but does not belong to this query.
NoSources
Nothing at all is configured, so there is nothing to ask.
NotWritable
A copy named a destination whose plugin has no write side.
NoDocuments
A document read or write named a source whose plugin has no documents.
The same shape NotWritable has, and for the same reason: the
declaration is read once at the handshake, so a source that says it has no
documents is refused before anything is read rather than asked and then apologised
for.
NoComments
A comment verb named a task of a source whose plugin has no comments.
The shape NoDocuments has, for its reason: the declaration is
read once at the handshake, so the source is refused before anything is read.
CommentsNotWritable
A comment verb that writes named a source whose comments can be read but not written.
StatusNotWritable
task status set named a source whose plugin has no write side.
MetadataNotWritable
A metadata verb named a record of a source whose plugin has no write side.
Fields
record: MetadataRecordWhich kind of record was named.
PriorityNotWritable
task priority set named a source whose plugin has no write side.
ContentNotWritable
task content set named a source whose plugin has no write side.
UpdateNotWritable
task update named a source whose plugin has no write side.
AssetNotReferenced
A create or a render was given an asset its content does not reference.
AssetNotGiven
A create or a render’s content references an asset the record would not hold.
AssetGivenTwice
A create or a render was given two assets under one name.
AssetsUnsupported
A record carrying an image asset was to be written to a source whose plugin stores none.
Fields
AssetNotHeld
A record whose content references an asset it does not hold was to be copied.
Fields
NotCreatable
task create or document create named a source whose plugin has no write side.
Fields
record: MetadataRecordWhich kind of record was to be created.
RenderingNotWritable
task render, project render or document render named a source whose plugin has no
write side.
Fields
record: RenderedRecordA task, a project or a document.
MissingAnswers
A regenerate left required variables unanswered, because the answers stored beside the item could not be used or did not cover them.
Fields
Template
A template could not be loaded or rendered, or refused the answers it was given.
Fields
error: TemplateErrorWhat the template refused.
NoStoredAnswers
An answers read named an item with no answers stored beside it.
Fields
record: RenderedRecordA task, a project or a document.
NoTemplate
A regenerate named no template, and the item records none.
MalformedProvenance
A regenerate named no template, and the item’s onetaskgraph.template entry is not one
this product writes, so it names nothing to render.
Fields
record: RenderedRecordA task, a project or a document.
TemplateNotAFile
A regenerate named no template, and the one the item records is not a readable file.
Fields
record: RenderedRecordA task, a project or a document.
NoPriority
A priority other than none was to be written — by task priority set or by a copy —
to a source whose plugin declares it holds no priority.
Refused before that source is asked anything, so a copy it stops has written nothing.
Fields
NoSuchProject
A metadata verb named a project its source does not hold.
NoSuchDocument
A metadata verb named a document its source does not hold.
NoSuchTask
A comment verb named a task its source does not hold.
NoSuchComment
A comment verb named a comment the task does not have.
Fields
A source the verb reads or writes one item of is configured but could not be built.
Distinct from DestinationUnavailable, whose next
action is about a copy.
SourceFailed
A source refused, or failed, the one call a verb made of it.
Distinct from SourceRefused, whose next action is about a
copy, and from a SourceFailure, which leaves other sources’ results standing: a
comment is one call to one source, so there is nothing else to report beside it.
A copy named a destination that is configured but could not be built.
NoSuchItem
A copy named an id its own source does not hold.
StaleOrigin
An item’s recorded origin names an item the destination no longer holds.
Refused rather than created: the destination item was deleted or moved on purpose, and creating a second one there would duplicate work somebody removed.
StaleLink
An item’s recorded copy link names an item the destination no longer holds.
Refused rather than created, for the reason Self::StaleOrigin is: the item the
last copy landed on was deleted at the destination, and creating another would
duplicate work somebody removed.
Fields
CreateWith
--create was given beside a flag that says how to look for a counterpart, when
--create says there is none to look for.
Fields
flag: CopyLookupThe flag given beside --create.
CreateCarried
--create named an item that itself records a counterpart at the destination.
Refused rather than created: the item’s own onetaskgraph.copies link — or its
origin — names an item there, so the caller’s assertion that the destination holds
none is wrong for it, and creating another would duplicate it.
Fields
NotAMember
A member copy named a task that is not a member of the project being copied.
Refused before anything is written, because a copy that names members names the part of one project it carries: a task of some other project, or of no project, is not a narrower version of that copy but a different one.
Fields
UnrecordedMember
A member copy’s item depends on a member it was not told to carry, and that member records no origin naming the destination.
Refused before anything is written. The destination id of a member the copy does not carry comes from that member’s own recorded origin and from nowhere else — not from a walk of the destination, which is the read a member copy exists to avoid — and writing the edge without it would either drop it silently or point it at the id the member has at its source, which the destination has never heard of.
Fields
destination: SourceNameThe destination it records no origin in.
Misrouted
A routed copy found an item’s existing counterpart in a source other than the one its repositories route it to now.
Refused before anything is written. A repository changed after a copy is a person’s decision about where the work lives, and moving it silently would leave the counterpart where it was, unlinked, beside a second one.
Fields
route: SourceNameThe source it routes to now.
SourceRefused
A source refused something the copy asked of it.
Distinct from a SourceFailure, which leaves the other sources’ results
standing: a copy is one write into one destination, and half of one is not an
answer.
CopyNotUndone
A copy failed, and the destination could not be put back the way it was found.
A copy is either complete or it never happened, and the engine undoes its own writes to make that true. When the destination will not take one of them back, the failure has to say so and name what is still there: a user told only that the copy failed would copy again over a destination nobody has described to them, which is the retry that trips a hosted destination’s rate limiter.
Fields
error: Box<EngineError>Why the copy failed in the first place.
left_behind: LeftBehindThe items the copy created or overwrote and could not take back.
The ids themselves rather than a sentence about them: a caller acting on this —
removing them, or reporting them — needs the ids, and the joined form only the
message needs is LeftBehind’s own Display.
refusal: SourceErrorWhat the destination said when the copy tried to take them back.
Trait Implementations§
Source§impl Clone for EngineError
impl Clone for EngineError
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()