pub struct SimpleMeta {
pub base: Ident,
pub is_list: bool,
pub range: Range<Bound<String>>,
pub total_digits: Option<usize>,
pub fraction_digits: Option<usize>,
pub pattern: Option<String>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub whitespace: WhiteSpace,
}
Expand description
Type information that contains data about a simple type including it’s potential restrictions.
If a simple type definition has additional restrictions (like xs:minExclusive
or xs:minLength
) it is represented as SimpleType
instead of a simple Reference
.
Fields§
§base: Ident
Type that is referenced.
is_list: bool
true
if this simple type is a list, false
otherwise.
range: Range<Bound<String>>
Range the value should be in.
total_digits: Option<usize>
Number of total digits the value maximal should have.
fraction_digits: Option<usize>
Number of fraction digits the value maximal should have.
pattern: Option<String>
Regex pattern the value should fulfill.
min_length: Option<usize>
The minimum length the value should have.
max_length: Option<usize>
The maximum length the value should have.
whitespace: WhiteSpace
Defines the whitespace handling.
Implementations§
Source§impl SimpleMeta
impl SimpleMeta
Sourcepub fn new(base: Ident) -> Self
pub fn new(base: Ident) -> Self
Create a new SimpleMeta
instance from the passed base
identifier.
Trait Implementations§
Source§impl Clone for SimpleMeta
impl Clone for SimpleMeta
Source§fn clone(&self) -> SimpleMeta
fn clone(&self) -> SimpleMeta
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SimpleMeta
impl Debug for SimpleMeta
Source§impl TypeEq for SimpleMeta
impl TypeEq for SimpleMeta
Source§fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
Feeds this value into the given
Hasher
.Source§fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
Check if this instance is equal to the
other
instance using the passed
types
to resolve identifiers.Source§fn type_hash_slice<H: Hasher>(slice: &[Self], hasher: &mut H, types: &MetaTypes)
fn type_hash_slice<H: Hasher>(slice: &[Self], hasher: &mut H, types: &MetaTypes)
Feeds a slice of this value into the given
Hasher
.Source§fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &MetaTypes) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &MetaTypes) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
Check if the two passed iterators contain type equal elements.
Auto Trait Implementations§
impl Freeze for SimpleMeta
impl RefUnwindSafe for SimpleMeta
impl Send for SimpleMeta
impl Sync for SimpleMeta
impl Unpin for SimpleMeta
impl UnwindSafe for SimpleMeta
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