pub enum SpecErrorKind {
Syntax,
Structure,
MissingField,
UnknownField,
UnknownQuestionType,
ReservedQuestionType,
Cardinality,
EmptyName,
DuplicateKey,
}Expand description
Machine-readable category of an authoring/validation failure.
Variants§
Syntax
The document text is not valid YAML/JSON. Carries line/column when known.
Structure
A document element has the wrong shape (e.g. a sequence where a mapping was required).
MissingField
A required key is absent (e.g. type, or criteria on a choice/score question).
UnknownField
A key the profile does not define was present. Unknown fields are rejected
(parity with the upstream SDKs’ extra=forbid behavior).
UnknownQuestionType
type names no known question primitive.
ReservedQuestionType
type names a reserved v2 primitive (span, derived) that v1 does not
implement. This is deliberately distinct from UnknownQuestionType so callers can
report “recognized but reserved” instead of “typo”.
Cardinality
A cardinality rule was violated: choice needs 2–255 options (D2), score needs ≥ 2 levels (D1), a request needs ≥ 1 question.
EmptyName
A required string is empty (question id, option name).
DuplicateKey
The same key appears twice in one mapping (question id or option name).
Implementations§
Trait Implementations§
Source§impl Clone for SpecErrorKind
impl Clone for SpecErrorKind
Source§fn clone(&self) -> SpecErrorKind
fn clone(&self) -> SpecErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpecErrorKind
impl Debug for SpecErrorKind
Source§impl Hash for SpecErrorKind
impl Hash for SpecErrorKind
Source§impl PartialEq for SpecErrorKind
impl PartialEq for SpecErrorKind
Source§fn eq(&self, other: &SpecErrorKind) -> bool
fn eq(&self, other: &SpecErrorKind) -> bool
self and other values to be equal, and is used by ==.impl Copy for SpecErrorKind
impl Eq for SpecErrorKind
impl StructuralPartialEq for SpecErrorKind
Auto Trait Implementations§
impl Freeze for SpecErrorKind
impl RefUnwindSafe for SpecErrorKind
impl Send for SpecErrorKind
impl Sync for SpecErrorKind
impl Unpin for SpecErrorKind
impl UnsafeUnpin for SpecErrorKind
impl UnwindSafe for SpecErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.