pub struct OverrideFrame { /* private fields */ }Expand description
Frame for xs:override (XSD 1.1)
Implementations§
Source§impl OverrideFrame
impl OverrideFrame
pub fn new( attrs: &AttributeMap, name_table: &NameTable, source: Option<SourceRef>, ) -> SchemaResult<Self>
Trait Implementations§
Source§impl Frame for OverrideFrame
Available on crate feature xsd11 only.
impl Frame for OverrideFrame
Available on crate feature
xsd11 only.Source§fn allows(&self, local_name: &str, _name_table: &NameTable) -> bool
fn allows(&self, local_name: &str, _name_table: &NameTable) -> bool
Check if a child element is allowed in the current phase
Source§fn allows_attribute(&self, local_name: &str, _name_table: &NameTable) -> bool
fn allows_attribute(&self, local_name: &str, _name_table: &NameTable) -> bool
Check if an attribute is allowed on this element
Source§fn on_child_start(&mut self, _local_name: &str, _name_table: &NameTable)
fn on_child_start(&mut self, _local_name: &str, _name_table: &NameTable)
Called when a child element is pushed
Source§fn attach(&mut self, child: FrameResult) -> SchemaResult<()>
fn attach(&mut self, child: FrameResult) -> SchemaResult<()>
Attach a completed child frame result
Source§fn finish(self: Box<Self>) -> SchemaResult<FrameResult>
fn finish(self: Box<Self>) -> SchemaResult<FrameResult>
Finish processing and return result
Source§fn children_are_top_level(&self) -> bool
fn children_are_top_level(&self) -> bool
Returns true if children of this frame are treated as top-level declarations.
True for schema, redefine, and override frames.
Source§fn set_foreign_attributes(&mut self, attrs: Vec<ForeignAttribute>)
fn set_foreign_attributes(&mut self, attrs: Vec<ForeignAttribute>)
Set foreign attributes
Source§fn validate_attributes(
&self,
attrs: &AttributeMap,
name_table: &NameTable,
) -> SchemaResult<()>
fn validate_attributes( &self, attrs: &AttributeMap, name_table: &NameTable, ) -> SchemaResult<()>
Validate attributes for this element
Source§fn is_skip_frame(&self) -> bool
fn is_skip_frame(&self) -> bool
Returns true if this is a SkipFrame (for error recovery depth tracking)
Source§fn children_inside_complex_type(&self) -> bool
fn children_inside_complex_type(&self) -> bool
Returns true if children of this frame are inside a
<complexType> ancestor
for purposes of src-element §3.3.3 / src-attribute §3.2.3 — i.e. the local
declaration’s targetNamespace may diverge from the schema’s only when there
is a complexType ancestor (and inside it, a restriction of a non-anyType base).
True for the complexType frame and the descendants that propagate the flag.Source§fn has_annotation(&self) -> bool
fn has_annotation(&self) -> bool
Returns true if this frame already has an annotation child.
Used to reject duplicate annotations per XSD content model.
Source§fn on_child_end(&mut self) -> bool
fn on_child_end(&mut self) -> bool
Called when leaving a child element in a skip frame
Returns true if the skip frame is complete (depth reached 0)
Source§fn accepts_text(&self) -> bool
fn accepts_text(&self) -> bool
Check if this frame accepts text content
Source§fn accepts_foreign_children(&self) -> bool
fn accepts_foreign_children(&self) -> bool
Returns true if this frame accepts foreign-namespace child elements.
Defaults to false: only
xs:appinfo and xs:documentation (and skip
frames during error recovery) accept arbitrary foreign content.Source§fn on_text(&mut self, _text: &str)
fn on_text(&mut self, _text: &str)
Handle text content (for annotation content like appinfo/documentation)
Source§fn on_cdata(&mut self, _cdata: &str)
fn on_cdata(&mut self, _cdata: &str)
Handle CDATA content (for annotation content like appinfo/documentation)
Source§fn set_namespaces(&mut self, _namespaces: NamespaceContextSnapshot)
fn set_namespaces(&mut self, _namespaces: NamespaceContextSnapshot)
Set namespace context snapshot (for annotation content)
Auto Trait Implementations§
impl Freeze for OverrideFrame
impl RefUnwindSafe for OverrideFrame
impl Send for OverrideFrame
impl Sync for OverrideFrame
impl Unpin for OverrideFrame
impl UnsafeUnpin for OverrideFrame
impl UnwindSafe for OverrideFrame
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