Skip to main content

EngineError

Enum EngineError 

Source
pub enum EngineError {
Show 34 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, }, 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, }, NotAMember { id: GlobalId, projects: Vec<GlobalId>, }, UnrecordedMember { item: GlobalId, member: GlobalId, destination: 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

§name: String

The name that was asked for.

§configured: String

The names that exist, for the message.

§

Token

A --page token that decodes but does not belong to this query.

Fields

§message: String

What the token claims that this configuration cannot honour.

§

NoSources

Nothing at all is configured, so there is nothing to ask.

§

NotWritable

A copy named a destination whose plugin has no write side.

Fields

§name: String

The configured name of the destination.

§kind: String

The plugin behind it.

§

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.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§

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.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§

CommentsNotWritable

A comment verb that writes named a source whose comments can be read but not written.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§

StatusNotWritable

task status set named a source whose plugin has no write side.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§

MetadataNotWritable

A metadata verb named a record of a source whose plugin has no write side.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§record: MetadataRecord

Which kind of record was named.

§

PriorityNotWritable

task priority set named a source whose plugin has no write side.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§

ContentNotWritable

task content set named a source whose plugin has no write side.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§

UpdateNotWritable

task update named a source whose plugin has no write side.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§

NotCreatable

task create or document create named a source whose plugin has no write side.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§record: MetadataRecord

Which kind of record was to be created.

§

RenderingNotWritable

task render or document render named a source whose plugin has no write side.

Fields

§name: String

The configured name of the source.

§kind: String

The plugin behind it.

§record: RenderedRecord

A task 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

§id: String

The item regenerated.

§names: Vec<String>

Every required variable left unanswered, in declaration order.

§reason: String

What became of the stored answers, as a clause: why they were not the base, or that they were and did not answer these.

§

Template

A template could not be loaded or rendered, or refused the answers it was given.

Fields

§error: TemplateError

What the template refused.

§

NoStoredAnswers

An answers read named an item with no answers stored beside it.

Fields

§record: RenderedRecord

A task or a document.

§id: String

The item.

§reason: String

Why none are there.

§

NoTemplate

A regenerate named no template, and the item records none.

Fields

§record: RenderedRecord

A task or a document.

§id: String

The item.

§

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: RenderedRecord

A task or a document.

§id: String

The item.

§problem: String

What is wrong with the entry.

§

TemplateNotAFile

A regenerate named no template, and the one the item records is not a readable file.

Fields

§record: RenderedRecord

A task or a document.

§id: String

The item.

§reference: String

The provenance template it records.

§

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

§name: String

The configured name of the source that cannot hold it.

§kind: String

The plugin behind it.

§task: String

The qualified id of the task whose priority it is.

§priority: Priority

The priority that could not be written.

§

NoSuchProject

A metadata verb named a project its source does not hold.

Fields

§id: String

The qualified id that named nothing.

§

NoSuchDocument

A metadata verb named a document its source does not hold.

Fields

§id: String

The qualified id that named nothing.

§

NoSuchTask

A comment verb named a task its source does not hold.

Fields

§id: String

The qualified id that named nothing.

§

NoSuchComment

A comment verb named a comment the task does not have.

Fields

§task: String

The qualified id of the task.

§comment: String

The comment id that named nothing on it.

§

SourceUnavailable

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.

Fields

§name: String

The configured name of the source.

§error: SourceError

Why it did not build.

§

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.

Fields

§name: String

The source that failed.

§error: SourceError

What it said.

§

DestinationUnavailable

A copy named a destination that is configured but could not be built.

Fields

§name: String

The configured name of the destination.

§error: SourceError

Why it did not build.

§

NoSuchItem

A copy named an id its own source does not hold.

Fields

§id: String

The qualified id that named nothing.

§

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.

Fields

§item: String

The item being copied.

§origin: String

The origin it records.

§

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

§id: GlobalId

The id that was named as a member.

§projects: Vec<GlobalId>

The projects the copy carries, none of which it is a member of.

§

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

§item: GlobalId

The item whose edge could not be resolved.

§member: GlobalId

The member that edge points at.

§destination: SourceName

The destination it records no origin in.

§

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.

Fields

§name: String

The source that refused.

§error: SourceError

What it said.

§

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: LeftBehind

The 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: SourceError

What the destination said when the copy tried to take them back.

Trait Implementations§

Source§

impl Clone for EngineError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EngineError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for EngineError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for EngineError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<&EngineError> for Failure

Source§

fn from(error: &EngineError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for EngineError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EngineError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.