#[non_exhaustive]pub enum DeclarationErrorKind {
Show 52 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,
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,
},
UnparsedFilterOption {
filter: String,
value: String,
},
DuplicateField {
name: 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
MissingDb
The router holds no toasty::Db.
MissingAuthModels
Auth is on, but the Db does not register the shipped models it needs.
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.
InvalidSegment
A path segment the panel routes cannot be a literal URL segment.
Fields
fault: SegmentFaultWhy it is refused.
PrefixOverlapsRuntime
The prefix overlaps Topcoat’s runtime endpoints.
PrefixOverlapsPanel
The prefix overlaps another panel’s.
ServeDirWithoutCatchAll
A Panel::serve_dir pattern that does not end in a catch-all.
ServeDirTwice
The panel serves the same directory pattern twice.
ServeDirTaken
Another panel already serves the directory pattern.
SecondHome
A second Panel::home page.
DuplicateResource
The resource is registered on the panel twice.
NotMounted
The resource is not mounted on the context’s panel.
ReservedSlug
A slug naming a route the panel serves itself.
DuplicateSlug
A slug another resource or page already mounts at.
DuplicateAction
Two actions share a NAME.
ActionInput
An action’s input cannot be served.
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 whose options come from a resource the panel does not register.
UnregisteredLabelSource
A relation column labelling its records by a resource the panel does not register.
TraversalLens
A lens with more than one step where a single field of the model is needed.
UnresolvedLens
A multi-step lens that resolves to no single column.
Fields
Unbound
An embedded path or value its declaration never bound to the app schema.
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
NoColumns
A table with no column.
ZeroPageSize
Table::paginate(0).
DuplicateColumn
Two table columns share a name.
DuplicateFilter
Two table filters share a name.
UnparsedFilterOption
A select filter option whose value the field’s type does not parse, so choosing it filters nothing.
DuplicateField
Two schema fields share a name.
UnplacedWatchedField
A condition watches a field the schema does not place.
HiddenWatchedField
A condition watches a field that another condition hides while what it guards still shows.
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.
MisdeclaredDependentChoice
A dependent choice’s column belongs to another model than its relationship’s source, or the choice has no relationship.
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.
UnplacedParentField
A dependent choice depends on a field the schema does not place.
RequiredConditionalField
A field a condition hides has no blank answer, so a submission hiding it cannot parse.
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.
FormClaimsTenantColumn
A tenant-scoped resource’s record form claims the tenant column.
EmptyChoice
A choice field with neither options nor a relationship.
CompositeKeyChoice
A relationship field over a model with a composite primary key.
UniqueWithoutIndex
A field marked unique over a column no unique index covers.
OptionalUnique
A unique field whose non-nullable column stores one value for every empty submission.
CreateColumnsNameTenant
create_column names the tenant column.
UnwrittenColumn
A non-nullable column nothing writes on create.
ManyToMany
A many-to-many field or relation whose join model cannot link records.
Trait Implementations§
Source§impl Clone for DeclarationErrorKind
impl Clone for DeclarationErrorKind
Source§impl Debug for DeclarationErrorKind
impl Debug for DeclarationErrorKind
Source§impl Display for DeclarationErrorKind
impl Display for DeclarationErrorKind
impl Eq for DeclarationErrorKind
Source§impl PartialEq for DeclarationErrorKind
impl PartialEq for DeclarationErrorKind
impl StructuralPartialEq for DeclarationErrorKind
Auto Trait Implementations§
impl Freeze for DeclarationErrorKind
impl RefUnwindSafe for DeclarationErrorKind
impl Send for DeclarationErrorKind
impl Sync for DeclarationErrorKind
impl Unpin for DeclarationErrorKind
impl UnsafeUnpin for DeclarationErrorKind
impl UnwindSafe for DeclarationErrorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.