Skip to main content

DeclarationErrorKind

Enum DeclarationErrorKind 

Source
#[non_exhaustive]
pub enum DeclarationErrorKind {
Show 42 variants MissingDb, MissingAuthModels { models: Vec<&'static str>, }, ShellAssetsWithoutBundle, 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, NotMounted, ReservedSlug { slug: String, }, DuplicateSlug { slug: String, }, DuplicateAction { name: &'static str, }, DuplicateRelation, UnregisteredRelation, UnregisteredOptionSource { field: String, source: &'static str, }, TraversalLens { steps: usize, }, UnresolvedLens { model: &'static str, steps: Vec<usize>, }, TenancyColumnNotAField, TenancyViaOwnColumn, TenancyViaWithoutBelongsTo, UnguardedForeignKey { relation: String, keys: Vec<String>, }, NoColumns, ZeroPageSize, DuplicateColumn { name: String, }, DuplicateFilter { name: String, }, DuplicateField { name: String, }, EmptyFormOverride, FormWithoutRecordForm, CreateWithoutForm, UnboundControl { control: String, }, ControlBoundTwice { control: String, }, MissingControl { field: String, key: String, }, NoBlankAnswer { control: String, field: String, in_repeater: bool, }, FormClaimsTenantColumn { field: String, column: String, }, CompositeKeyChoice { field: String, }, UniqueWithoutIndex { field: String, }, CreateColumnsNameTenant { column: String, }, UnknownCreateColumn { column: &'static str, }, UnwrittenColumn { column: String, },
}
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.

§

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 Page::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.

§

NotMounted

The resource is not mounted on the request’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.

§

DuplicateRelation

Two relations to the same resource.

§

UnregisteredRelation

A relation to a resource the panel does not register.

§

UnregisteredOptionSource

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

Fields

§field: String

The field.

§source: &'static str

The option 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.

§

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.

§

DuplicateField

Two schema fields share a name.

Fields

§name: String

The shared name.

§

EmptyFormOverride

A form() override that declares no control over a record form with fields.

§

FormWithoutRecordForm

A form schema on a resource whose Form serves no form.

§

CreateWithoutForm

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

§

UnboundControl

A form control no record-form field binds, so its input is never written.

Fields

§control: String

The control’s key.

§

ControlBoundTwice

A form control more than one record-form field binds.

Fields

§control: String

The control’s key.

§

MissingControl

A record-form field binding a key the form declares no control for.

Fields

§field: String

The record-form field.

§key: String

The key it binds.

§

NoBlankAnswer

A control that may be posted empty over a record-form field with no blank answer.

Fields

§control: String

The control’s key.

§field: String

The record-form field.

§in_repeater: bool

Whether the control sits inside a Repeater; otherwise it is optional.

§

FormClaimsTenantColumn

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

Fields

§field: String

The record-form field.

§column: String

The tenant column.

§

CompositeKeyChoice

A relationship field over a model with a composite primary key.

Fields

§field: String

The field.

§

UniqueWithoutIndex

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

Fields

§field: String

The field.

§

CreateColumnsNameTenant

create_columns names the tenant column.

Fields

§column: String

The tenant column.

§

UnknownCreateColumn

create_columns names a field the model does not have.

Fields

§column: &'static str

The name.

§

UnwrittenColumn

A non-nullable column nothing writes on create.

Fields

§column: String

The column.

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