pub struct Facets {
pub enumeration: Vec<String>,
pub patterns: Vec<Pattern>,
pub length: Option<usize>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub min_inclusive: Option<f64>,
pub max_inclusive: Option<f64>,
pub min_exclusive: Option<f64>,
pub max_exclusive: Option<f64>,
}Expand description
Constraints a simple type places on a value, as written.
Read Schema::effective_facets instead of a single type’s facets: a
restriction chain spreads them over several links.
Fields§
§enumeration: Vec<String>Permitted values. Empty means unconstrained rather than “nothing allowed”.
patterns: Vec<Pattern>Patterns declared here, which XSD reads as alternatives: a value matching any one of them satisfies this link.
length: Option<usize>§min_length: Option<usize>§max_length: Option<usize>§min_inclusive: Option<f64>Numeric bounds, held as f64. Every bound in the published catalog is
small enough to be exact; a bound past 2^53 on an xs:long would not be,
and is worth revisiting if a program’s message set carries one.
max_inclusive: Option<f64>§min_exclusive: Option<f64>§max_exclusive: Option<f64>Trait Implementations§
Auto Trait Implementations§
impl Freeze for Facets
impl RefUnwindSafe for Facets
impl Send for Facets
impl Sync for Facets
impl Unpin for Facets
impl UnwindSafe for Facets
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