#[non_exhaustive]pub enum FieldRuleFault {
Show 20 variants
UnorderedBound(String),
InvalidPattern(String),
EmptyRange,
RefusedDefault(String),
UnparsedDefault(String),
NotText(&'static str),
NotCheckbox,
SingleValue,
FewerOptions(usize),
TagsOverRecords,
AboveRowCap(usize),
RefusedBlank,
UnplacedComparedField(String),
IncomparableField(String),
UnorderedComparison(String),
SelfComparison,
NoExtension,
InvalidExtension(String),
SingleFile,
AboveFormCap {
max: usize,
cap: usize,
},
}Expand description
Why a field’s declared rules cannot work:
DeclarationErrorKind::FieldRule.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnorderedBound(String)
A min or max that is no value the field’s type parses, or a type without an order.
Bound a number, date, time or timestamp field by a value of its type.
InvalidPattern(String)
A pattern the server does not compile, with the compiler’s reason.
Fix the pattern.
EmptyRange
A min_length above the max_length, or a min above the max: no value passes.
Lower the minimum or raise the maximum.
RefusedDefault(String)
A default that breaks a rule, so a create that keeps it is refused.
Change the default or the rule.
UnparsedDefault(String)
A default the field’s type does not parse, as a timestamp spelled without an offset, so a create that keeps it is refused.
Spell the default as the type does, or pass a value of the type.
NotText(&'static str)
A rich text editor over a field whose type is no text, as a number or a timestamp, carrying the input type its text control had.
NotCheckbox
accepted on a control other than the built-in checkbox or switch.
SingleValue
min_items or max_items on a choice that is not multiple.
FewerOptions(usize)
A multiple choice’s min_items above the count of static options it offers, carried.
TagsOverRecords
tags on a relationship’s choice: a typed value names no record.
Drop tags, or offer static options as its suggestions.
AboveRowCap(usize)
A repeater’s max_items above MAX_REPEATER_ROWS,
carried.
RefusedBlank
A field always disabled, with no default, whose blank answer breaks its own rules: an
accepted checkbox or a min_items, so every create is refused.
UnplacedComparedField(String)
A comparison with a field the schema does not place, carried.
Place the compared field in the same schema, or in the same repeater row.
IncomparableField(String)
A comparison with a field that is no text field of the same type, carried.
Compare two fields of one type: an Option<T> field compares with a T one.
UnorderedComparison(String)
An ordering comparison over a type without an order, carrying the compared field.
Order a number, date, time or timestamp field, or compare with different.
SelfComparison
A comparison with the declaring field itself, so gt and lt refuse every value and the
others none.
Compare with another field.
NoExtension
A file field’s extensions listing none, so it refuses every file.
List the extensions it takes, or drop extensions to take any.
InvalidExtension(String)
A file field’s extension that is not letters and digits, carried: tar.gz or *, which
no file’s last extension is, as the rule reads only the last.
List the last extension alone: gz.
SingleFile
max_files on a file field over one path, from Field::file.
Bind a Vec<String> with Field::files, or drop max_files.
AboveFormCap
A file field’s max_bytes at or above the panel’s body cap,
Limits::body_bytes: the body cap refuses a larger file
first, so the rule never refuses one.
Lower max_bytes below the cap, or raise the cap.
Trait Implementations§
Source§impl Clone for FieldRuleFault
impl Clone for FieldRuleFault
Source§impl Debug for FieldRuleFault
impl Debug for FieldRuleFault
impl Eq for FieldRuleFault
Source§impl PartialEq for FieldRuleFault
impl PartialEq for FieldRuleFault
impl StructuralPartialEq for FieldRuleFault
Auto Trait Implementations§
impl Forget for FieldRuleFault
impl Freeze for FieldRuleFault
impl RefUnwindSafe for FieldRuleFault
impl Send for FieldRuleFault
impl Sync for FieldRuleFault
impl Unpin for FieldRuleFault
impl UnsafeUnpin for FieldRuleFault
impl UnwindSafe for FieldRuleFault
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
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.