pub enum SchemaError {
Show 19 variants
UnknownWireType(String),
UnexpectedChildren {
wire_type: WireType,
count: usize,
},
TooManyChildren {
wire_type: WireType,
count: usize,
maximum: usize,
},
EmptyTableSchemas,
UnknownRegistryReference(String),
MissingTableSchema {
index: usize,
},
FormatMustBeSkiff,
MissingFormatAttribute(&'static str),
InvalidRegistryReference,
InvalidSchemaReference,
UnexpectedAttributes {
context: &'static str,
},
ExpectedMap {
context: &'static str,
},
ExpectedList {
context: &'static str,
},
MissingField {
context: &'static str,
field: &'static str,
},
ExpectedString {
context: &'static str,
field: &'static str,
},
InvalidUtf8 {
field: &'static str,
},
UnknownField {
context: &'static str,
field: String,
},
TableSchemaRootMustBeTuple {
found: WireType,
},
TableSchemaChildMissingName {
index: usize,
},
}Expand description
A schema or format declaration the codec refuses before reading a stream.
Variants§
UnknownWireType(String)
A wire_type value is not part of the Skiff protocol.
UnexpectedChildren
A leaf type declared child schemas.
Fields
TooManyChildren
A variant has more children than its tag can name.
Fields
EmptyTableSchemas
A format omitted the required table-schema list.
UnknownRegistryReference(String)
A table schema lookup named no registered schema.
MissingTableSchema
A table index was not included in a format.
FormatMustBeSkiff
The format value was not the literal string skiff.
MissingFormatAttribute(&'static str)
A required format attribute was absent.
InvalidRegistryReference
A registry reference did not start with a non-empty $ name.
InvalidSchemaReference
A table schema entry was neither an inline schema map nor a registry reference.
UnexpectedAttributes
A YSON value had attributes where the schema grammar forbids them.
ExpectedMap
A YSON value did not have the expected map shape.
ExpectedList
A YSON value did not have the expected list shape.
MissingField
A required map field was absent.
ExpectedString
A map field did not contain a YSON string.
Fields
InvalidUtf8
A field that must be text contained invalid UTF-8 bytes.
UnknownField
A schema map carried an unsupported field.
Fields
TableSchemaRootMustBeTuple
A table schema’s root node was not a tuple.
TableSchemaChildMissingName
A direct child of the table-root tuple had no name.
Trait Implementations§
Source§impl Clone for SchemaError
impl Clone for SchemaError
Source§fn clone(&self) -> SchemaError
fn clone(&self) -> SchemaError
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 SchemaError
impl Debug for SchemaError
Source§impl Display for SchemaError
impl Display for SchemaError
impl Eq for SchemaError
Source§impl Error for SchemaError
impl Error for SchemaError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()