#[non_exhaustive]pub enum SchemaReading {
Strict,
Lenient,
}Expand description
How a native-layout codec with a schema treats content the schema does not declare.
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.
Strict
Every value is typed from its attribute’s declaration, never from its text, and an entity, attribute or value the schema does not declare is a typed error naming it. The default with a schema.
Lenient
The pre-0.4 behaviour: names resolve through the schema when they
can, values are inferred from their text, and unknown names are kept
after the declared slots. Round-trips models the schema does not
describe, at the price of reading Name="1" as an integer.
Trait Implementations§
Source§impl Clone for SchemaReading
impl Clone for SchemaReading
impl Copy for SchemaReading
Source§impl Debug for SchemaReading
impl Debug for SchemaReading
Source§impl Default for SchemaReading
impl Default for SchemaReading
impl Eq for SchemaReading
Source§impl PartialEq for SchemaReading
impl PartialEq for SchemaReading
impl StructuralPartialEq for SchemaReading
Auto Trait Implementations§
impl Freeze for SchemaReading
impl RefUnwindSafe for SchemaReading
impl Send for SchemaReading
impl Sync for SchemaReading
impl Unpin for SchemaReading
impl UnsafeUnpin for SchemaReading
impl UnwindSafe for SchemaReading
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
Mutably borrows from an owned value. Read more