pub enum ComplexContentResult {
Empty,
Simple(SimpleContentDefResult),
Complex(ComplexContentDefResult),
}Expand description
Complex content result
Variants§
Implementations§
Source§impl ComplexContentResult
impl ComplexContentResult
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if this content has empty explicit content per
§3.4.2.3 step 2 (used by §3.4.6.3 effective content and the
<defaultOpenContent appliesToEmpty="false"> gate).
Empty cases:
- 2.1.1: no
<group>/<all>/<choice>/<sequence>child (no particle) - 2.1.2: an
<all>or<sequence>child with empty particles - 2.1.3: a
<choice>child withminOccurs=0and empty particles - 2.1.4: the child has
maxOccurs=0
SimpleContent is never empty.
Sourcepub fn explicit_content_type_is_empty(&self) -> bool
pub fn explicit_content_type_is_empty(&self) -> bool
True when this complex content collapses to explicit content type
variety = empty per §3.4.2.3 step 4.1.1 (restriction) — used by the
<defaultOpenContent appliesToEmpty="false"> gate (§3.4.2.3 step
5.2.2). Equivalent to “explicit content empty AND effective mixed
false”: when mixed is true, step 3.1.1 promotes the empty explicit
content to a non-empty effective content (an empty sequence
particle), which means the explicit content type variety is mixed,
not empty.
Trait Implementations§
Source§impl Clone for ComplexContentResult
impl Clone for ComplexContentResult
Source§fn clone(&self) -> ComplexContentResult
fn clone(&self) -> ComplexContentResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ComplexContentResult
impl RefUnwindSafe for ComplexContentResult
impl Send for ComplexContentResult
impl Sync for ComplexContentResult
impl Unpin for ComplexContentResult
impl UnsafeUnpin for ComplexContentResult
impl UnwindSafe for ComplexContentResult
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