pub struct SchemaId {
pub family: ApFamily,
pub edition: Option<u8>,
pub stage: Stage,
pub raw: Option<NonEmptyStringList>,
}Expand description
Structured identity of a file’s FILE_SCHEMA: AP family, edition, and
stage, plus the raw text.
Derived by identify_schema from the FILE_SCHEMA descriptor — the
schema-version token { ... 10303 <part> <version> ... } is parsed
generically (whitespace/arity tolerant) and mapped through the
per-family catalog; an unrecognised name falls back to
ApFamily::Other and an unrecognised version to edition: None, so
future editions are still recognised by family.
raw: Some(_)— preserved verbatim from a source file (read path); byte-exact round-trip relies on this.raw: None— a synthetic model (kernel-built); the writer supplies a canonicalFILE_SCHEMAfor the chosen target.
Fields§
§family: ApFamily§edition: Option<u8>AP edition (1, 2, 3, …); None when the token does not pin it
(e.g. AP214 CD/DIS, or an unrecognised AP242 module version).
stage: Stage§raw: Option<NonEmptyStringList>Implementations§
Source§impl SchemaId
impl SchemaId
Sourcepub fn synthetic(family: ApFamily, edition: Option<u8>, stage: Stage) -> Self
pub fn synthetic(family: ApFamily, edition: Option<u8>, stage: Stage) -> Self
A synthetic identity with no preserved raw text (kernel-built model).
Sourcepub fn is_recognized(&self) -> bool
pub fn is_recognized(&self) -> bool
Whether step-io recognised the AP family.
Sourcepub fn raw(&self) -> Option<&NonEmptyStringList>
pub fn raw(&self) -> Option<&NonEmptyStringList>
Preserved raw FILE_SCHEMA text, if any (None for synthetic).
Trait Implementations§
impl Eq for SchemaId
impl StructuralPartialEq for SchemaId
Auto Trait Implementations§
impl Freeze for SchemaId
impl RefUnwindSafe for SchemaId
impl Send for SchemaId
impl Sync for SchemaId
impl Unpin for SchemaId
impl UnsafeUnpin for SchemaId
impl UnwindSafe for SchemaId
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