pub struct EngineSemantics {
pub profile: ProfileId,
pub kind: EngineKind,
pub primitives: Vec<PrimitiveSpec>,
pub catcodes: CatcodeDefaults,
pub mathcodes: MathcodeDefaults,
pub registers: RegisterDefaults,
pub fonts: FontSemantics,
pub extensions: ExtensionPolicy,
pub patches: EnginePatches,
}Expand description
Owned copy of profile settings so shared TeX code can check the active profile at runtime.
Fields§
§profile: ProfileIdProfile identifier for this semantics snapshot.
kind: EngineKindEngine variant reported by the profile.
primitives: Vec<PrimitiveSpec>Primitives declared by the profile.
catcodes: CatcodeDefaultsCategory code defaults for this profile.
mathcodes: MathcodeDefaultsMath code defaults for this profile.
registers: RegisterDefaultsRegister count defaults for this profile.
fonts: FontSemanticsFont capability settings for this profile.
extensions: ExtensionPolicyExtension families active for this profile.
patches: EnginePatchesComputed patch flags derived from the extension policy.
Implementations§
Source§impl EngineSemantics
impl EngineSemantics
Sourcepub fn from_profile<P>(profile: &P) -> Selfwhere
P: EngineProfile,
pub fn from_profile<P>(profile: &P) -> Selfwhere
P: EngineProfile,
Constructs an EngineSemantics snapshot from any EngineProfile implementor.
Sourcepub fn primitives(&self) -> &[PrimitiveSpec]
pub fn primitives(&self) -> &[PrimitiveSpec]
Returns the slice of primitives registered for this profile.
Sourcepub fn primitive(&self, name: &str) -> Option<&PrimitiveSpec>
pub fn primitive(&self, name: &str) -> Option<&PrimitiveSpec>
Finds a PrimitiveSpec by control sequence name, or None if not registered.
Sourcepub fn has_primitive(&self, name: &str) -> bool
pub fn has_primitive(&self, name: &str) -> bool
Returns true if a primitive with the given name is registered for this profile.
Sourcepub const fn has_patch(&self, patch: EnginePatch) -> bool
pub const fn has_patch(&self, patch: EnginePatch) -> bool
Returns true if the given engine patch is active.
Trait Implementations§
Source§impl Clone for EngineSemantics
impl Clone for EngineSemantics
Source§fn clone(&self) -> EngineSemantics
fn clone(&self) -> EngineSemantics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more