pub enum Facet {
Length(usize),
MinLength(usize),
MaxLength(usize),
Pattern(Pattern),
Enumeration(Vec<String>),
MinInclusive(Bound),
MaxInclusive(Bound),
MinExclusive(Bound),
MaxExclusive(Bound),
TotalDigits(u32),
FractionDigits(u32),
ExplicitTimezone(TimezoneRequirement),
}Expand description
One facet constraint. Multiple facets of the same kind on one type are collapsed by the schema compiler into the most-restrictive single value (XSD §4.3 derivation rules).
Variants§
Length(usize)
MinLength(usize)
MaxLength(usize)
Pattern(Pattern)
Compiled XSD-flavour pattern. See super::regex::Pattern.
Enumeration(Vec<String>)
MinInclusive(Bound)
WhiteSpace is special-cased on the type itself (see
SimpleType::whitespace).
Not a Facet variant.
MaxInclusive(Bound)
MinExclusive(Bound)
MaxExclusive(Bound)
TotalDigits(u32)
FractionDigits(u32)
ExplicitTimezone(TimezoneRequirement)
XSD 1.1 § 4.3.13 xs:explicitTimezone — restricts whether
values of a date/time type must, must not, or may carry a
timezone offset. Default is optional (no constraint); the
compiler only emits this variant when the schema explicitly
sets the facet.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Facet
impl RefUnwindSafe for Facet
impl Send for Facet
impl Sync for Facet
impl Unpin for Facet
impl UnsafeUnpin for Facet
impl UnwindSafe for Facet
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