Skip to main content

DeclarationErrorKind

Enum DeclarationErrorKind 

Source
#[non_exhaustive]
pub enum DeclarationErrorKind {
Show 57 variants MissingDb, MissingAuthModels { models: Vec<&'static str>, }, ShellAssetsWithoutBundle, FileFieldWithoutUploader { field: String, }, InvalidSegment { item: &'static str, segment: String, fault: SegmentFault, }, PrefixOverlapsRuntime { prefix: String, }, PrefixOverlapsPanel { other: String, }, ServeDirWithoutCatchAll { path: String, }, ServeDirTwice { path: String, }, ServeDirTaken { path: String, panel: String, }, SecondHome, DuplicateResource, DuplicatePage, NotMounted, ReservedSlug { slug: String, }, DuplicateSlug { slug: String, }, DuplicateAction { name: &'static str, }, ActionInput { action: &'static str, fault: ActionInputFault, }, SignUp(SignUpFault), DuplicateRelation, UnregisteredRelation, UnregisteredOptionSource { field: String, source: &'static str, }, UnregisteredLabelSource { column: String, source: &'static str, }, TraversalLens { steps: usize, }, UnresolvedLens { model: &'static str, steps: Vec<usize>, }, Unbound { item: &'static str, }, TenancyColumnNotAField, TenancyViaOwnColumn, TenancyViaWithoutBelongsTo, UnguardedForeignKey { relation: String, keys: Vec<String>, }, NoColumns, ZeroPageSize, DuplicateColumn { name: String, }, DuplicateFilter { name: String, }, DottedFilterName { name: String, }, UnparsedFilterOption { filter: String, value: String, }, DuplicateField { name: String, }, DisabledWithoutValue { field: String, }, RepeaterLeafModifier { field: String, leaf: String, }, UnpostedDefault { field: String, value: String, }, UnplacedWatchedField { field: String, }, HiddenWatchedField { field: String, }, UnpostedConditionValue { field: String, value: String, }, MisdeclaredDependentChoice { field: String, }, MultipleDependentChoice { field: String, }, UnplacedParentField { field: String, parent: String, }, RequiredConditionalField { field: String, }, CreateWithoutForm, MissingControl { field: String, key: String, }, FormClaimsTenantColumn { field: String, column: String, }, EmptyChoice { field: String, }, CompositeKeyChoice { field: String, }, UniqueWithoutIndex { field: String, }, OptionalUnique { field: String, }, CreateColumnsNameTenant { column: String, }, UnwrittenColumn { column: String, }, ManyToMany { field: String, fault: ManyToManyFault, },
}
Expand description

What is wrong with a declaration.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MissingDb

The router holds no toasty::Db.

§

MissingAuthModels

Auth is on, but the Db does not register the shipped models it needs.

Fields

§models: Vec<&'static str>

The unregistered models.

§

ShellAssetsWithoutBundle

Panel::shell_assets is set, but the router has no asset bundle.

§

FileFieldWithoutUploader

A form declares a file field, but the panel installs no Uploader to store its bytes.

Fields

§field: String

The file field’s name.

§

InvalidSegment

A path segment the panel routes cannot be a literal URL segment.

Fields

§item: &'static str

What names the segment: panel prefix, ResourceDef::slug or PageDef::slug.

§segment: String

The refused segment.

§fault: SegmentFault

Why it is refused.

§

PrefixOverlapsRuntime

The prefix overlaps Topcoat’s runtime endpoints.

Fields

§prefix: String

The panel’s prefix.

§

PrefixOverlapsPanel

The prefix overlaps another panel’s.

Fields

§other: String

The other panel’s prefix.

§

ServeDirWithoutCatchAll

A Panel::serve_dir pattern that does not end in a catch-all.

Fields

§path: String

The pattern.

§

ServeDirTwice

The panel serves the same directory pattern twice.

Fields

§path: String

The pattern.

§

ServeDirTaken

Another panel already serves the directory pattern.

Fields

§path: String

The pattern.

§panel: String

The serving panel’s prefix.

§

SecondHome

A second Panel::home page.

§

DuplicateResource

The resource is registered on the panel twice.

§

DuplicatePage

The page is registered on the panel twice, Panel::home included.

§

NotMounted

The resource is not mounted on the context’s panel.

§

ReservedSlug

A slug naming a route the panel serves itself.

Fields

§slug: String

The slug.

§

DuplicateSlug

A slug another resource or page already mounts at.

Fields

§slug: String

The slug.

§

DuplicateAction

Two actions share a NAME.

Fields

§name: &'static str

The shared name.

§

ActionInput

An action’s input cannot be served.

Fields

§action: &'static str

The action’s NAME.

§fault: ActionInputFault

What is wrong with it.

§

SignUp(SignUpFault)

The panel’s sign-up page cannot be served.

§

DuplicateRelation

Two relations to the same resource.

§

UnregisteredRelation

A relation to a resource the panel does not register.

§

UnregisteredOptionSource

A relationship field, or a relationship filter, whose options come from a resource the panel does not register.

Fields

§field: String

The field.

§source: &'static str

The option source’s type.

§

UnregisteredLabelSource

A relation column labelling its records by a resource the panel does not register.

Fields

§column: String

The column.

§source: &'static str

The label source’s type.

§

TraversalLens

A lens with more than one step where a single field of the model is needed.

Fields

§steps: usize

The lens’s step count.

§

UnresolvedLens

A multi-step lens that resolves to no single column.

Fields

§model: &'static str

The lens’s model.

§steps: Vec<usize>

The lens’s field indices, step by step.

§

Unbound

An embedded path or value its declaration never bound to the app schema.

Fields

§item: &'static str

The path’s model, or the embedded value’s type.

§

TenancyColumnNotAField

A Tenancy::column lens that names no field of the model.

§

TenancyViaOwnColumn

A Tenancy::via lens that names one field of the model.

§

TenancyViaWithoutBelongsTo

A Tenancy::via lens whose first step is no belongs_to relation.

§

UnguardedForeignKey

A Tenancy::via resource whose form writes the parent’s foreign key other than through a relationship field over a tenant-scoped resource of the parent’s model.

Fields

§relation: String

The belongs_to relation the lens steps through.

§keys: Vec<String>

The foreign-key columns written another way.

§

NoColumns

A table with no column.

§

ZeroPageSize

Table::paginate(0).

§

DuplicateColumn

Two table columns share a name.

Fields

§name: String

The shared name.

§

DuplicateFilter

Two table filters share a name.

Fields

§name: String

The shared name.

§

DottedFilterName

A table filter’s name holds a ., which its URL parameters reserve for a part: f.<name>.<part>.

Fields

§name: String

The name.

§

UnparsedFilterOption

A select filter option whose value the field’s type does not parse, so choosing it filters nothing.

Fields

§filter: String

The filter’s name.

§value: String

The option’s value.

§

DuplicateField

Two schema fields share a name.

Fields

§name: String

The shared name.

§

DisabledWithoutValue

A field disabled on the create form, with no default and no blank answer: no create could fill it.

Fields

§field: String

The disabled field.

§

RepeaterLeafModifier

A repeater’s item disables one of its row’s controls or gives it a default, which a row does not apply.

Fields

§field: String

The repeater.

§leaf: String

The control in its row.

§

UnpostedDefault

A field’s default is a value its control never posts: one its type does not parse, one not among a choice’s options, or a list or one value where the control posts the other.

Fields

§field: String

The field.

§value: String

The default, a list spelled ["a", "b"].

§

UnplacedWatchedField

A condition watches a field the schema does not place.

Fields

§field: String

The watched field.

§

HiddenWatchedField

A condition watches a field that another condition hides while what it guards still shows.

Fields

§field: String

The watched field.

§

UnpostedConditionValue

A condition names a value its watched field never posts: not one of a choice’s options, or neither true nor false for a toggle.

Fields

§field: String

The watched field.

§value: String

The value.

§

MisdeclaredDependentChoice

A dependent choice’s column belongs to another model than its relationship’s source, or the choice has no relationship.

Fields

§field: String

The dependent choice.

§

MultipleDependentChoice

A dependent choice that takes several options, or that depends on one that does: a multiple choice’s key holds a list, which narrows nothing.

Fields

§field: String

The dependent choice.

§

UnplacedParentField

A dependent choice depends on a field the schema does not place.

Fields

§field: String

The dependent choice.

§parent: String

The field it depends on.

§

RequiredConditionalField

A field a condition hides has no blank answer, so a submission hiding it cannot parse.

Fields

§field: String

The field.

§

CreateWithoutForm

A resource whose policy allows create but that has no form.

§

MissingControl

A record-form field binding a key no control posts, after the form renders every field it does not place: a hand-written RecordForm::control that renders no control for it.

Fields

§field: String

The record-form field.

§key: String

The key it binds.

§

FormClaimsTenantColumn

A tenant-scoped resource’s record form claims the tenant column.

Fields

§field: String

The record-form field.

§column: String

The tenant column.

§

EmptyChoice

A choice field with neither options nor a relationship.

Fields

§field: String

The field.

§

CompositeKeyChoice

A relationship field, or a relationship filter, over a model with a composite primary key.

Fields

§field: String

The field, or the filter’s name.

§

UniqueWithoutIndex

A field marked unique over a column no unique index covers.

Fields

§field: String

The field.

§

OptionalUnique

A unique field whose non-nullable column stores one value for every empty submission.

Fields

§field: String

The field.

§

CreateColumnsNameTenant

create_column names the tenant column.

Fields

§column: String

The tenant column.

§

UnwrittenColumn

A non-nullable column nothing writes on create.

Fields

§column: String

The column.

§

ManyToMany

A many-to-many field or relation whose join model cannot link records.

Fields

§field: String

The field, or the relation’s via field.

§fault: ManyToManyFault

What is wrong.

Trait Implementations§

Source§

impl Clone for DeclarationErrorKind

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 DeclarationErrorKind

Source§

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

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

impl Display for DeclarationErrorKind

Source§

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

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

impl Eq for DeclarationErrorKind

Source§

impl PartialEq for DeclarationErrorKind

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 DeclarationErrorKind

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> CloneAny for T
where T: Any + Clone,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more