pub enum CharacterDataSpec {
Enum {
items: &'static [(EnumItem, u32)],
},
Pattern {
check_fn: fn(_: &[u8]) -> bool,
regex: &'static str,
max_length: Option<usize>,
},
String {
preserve_whitespace: bool,
max_length: Option<usize>,
},
UnsignedInteger,
Double,
}
Expand description
Specifies the data type and restrictions of the character data in an element or attribute
Variants§
Enum
The character data is an enum value; valid values are given in items and the character data must match one of these
Pattern
The character data is restricted to match a regex, which is given in text form in the filed regex. The check_fn is a function that validates input according to the regex. If a max_length is given, then it restricts the length (in bytes).
String
An arbitrary string; if preserve whitepace is set, then whitespace should be preserved during parsing (see the XML standard)
UnsignedInteger
Double
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for CharacterDataSpec
impl Send for CharacterDataSpec
impl Sync for CharacterDataSpec
impl Unpin for CharacterDataSpec
impl UnwindSafe for CharacterDataSpec
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