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,
Float,
}
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 regular expression, which is given in text form in the field regex
.
Fields
String
An arbitrary string; if preserve whitepace is set, then whitespace should be preserved during parsing (see the XML standard)
UnsignedInteger
Float
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CharacterDataSpec
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