Skip to main content

ImportFrame

Struct ImportFrame 

Source
pub struct ImportFrame { /* private fields */ }
Expand description

Frame for xs:import

Implementations§

Source§

impl ImportFrame

Source

pub fn new( attrs: &AttributeMap, name_table: &NameTable, source: Option<SourceRef>, ) -> SchemaResult<Self>

Trait Implementations§

Source§

impl Frame for ImportFrame

Source§

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

Check if an attribute is allowed on this element
Source§

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<()>

Attach a completed child frame result
Source§

fn finish(self: Box<Self>) -> SchemaResult<FrameResult>

Finish processing and return result
Source§

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 source(&self) -> Option<&SourceRef>

Get the source location
Source§

fn set_foreign_attributes(&mut self, attrs: Vec<ForeignAttribute>)

Set foreign attributes
Source§

fn validate_attributes( &self, attrs: &AttributeMap, name_table: &NameTable, ) -> SchemaResult<()>

Validate attributes for this element
Source§

fn is_skip_frame(&self) -> bool

Returns true if this is a SkipFrame (for error recovery depth tracking)
Source§

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 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 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

Check if this frame accepts text content
Source§

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)

Handle text content (for annotation content like appinfo/documentation)
Source§

fn on_cdata(&mut self, _cdata: &str)

Handle CDATA content (for annotation content like appinfo/documentation)
Source§

fn set_namespaces(&mut self, _namespaces: NamespaceContextSnapshot)

Set namespace context snapshot (for annotation content)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSendSync for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.