pub struct SourceRef {
pub doc_id: DocumentId,
pub span: SourceSpan,
pub schema_defaults_doc: Option<DocumentId>,
}Expand description
Reference to a location within a schema document
Fields§
§doc_id: DocumentId§span: SourceSpan§schema_defaults_doc: Option<DocumentId>When set, overrides doc_id for schema-document-level defaults
lookup (elementFormDefault, attributeFormDefault, blockDefault,
finalDefault, defaultAttributes). Used for xs:override children
that are conceptually placed in the overridden document D2 per
§4.2.5 / F.2 transformation semantics.
Implementations§
Source§impl SourceRef
impl SourceRef
pub fn new(doc_id: DocumentId, span: SourceSpan) -> Self
Sourcepub fn defaults_doc(&self) -> DocumentId
pub fn defaults_doc(&self) -> DocumentId
The document ID to use for schema-level defaults lookup.
Returns schema_defaults_doc if set (override components),
otherwise falls back to doc_id.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SourceRef
impl RefUnwindSafe for SourceRef
impl Send for SourceRef
impl Sync for SourceRef
impl Unpin for SourceRef
impl UnsafeUnpin for SourceRef
impl UnwindSafe for SourceRef
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