pub struct PrimitiveRegistry { /* private fields */ }Expand description
Maps primitive control sequence names to their dispatch opcodes and semantic kinds.
Implementations§
Source§impl PrimitiveRegistry
impl PrimitiveRegistry
Sourcepub fn from_specs(
specs: &[PrimitiveSpec],
) -> Result<Self, PrimitiveRegistryError>
pub fn from_specs( specs: &[PrimitiveSpec], ) -> Result<Self, PrimitiveRegistryError>
Builds a registry from a slice of specs, returning an error on the first duplicate name.
Sourcepub fn insert(
&mut self,
spec: &PrimitiveSpec,
) -> Result<(), PrimitiveRegistryError>
pub fn insert( &mut self, spec: &PrimitiveSpec, ) -> Result<(), PrimitiveRegistryError>
Inserts a single primitive spec, returning an error if the name is already registered.
Sourcepub fn get(&self, name: &str) -> Option<&PrimitiveEntry>
pub fn get(&self, name: &str) -> Option<&PrimitiveEntry>
Look up a primitive by control sequence name without leading backslash.
Trait Implementations§
Source§impl Clone for PrimitiveRegistry
impl Clone for PrimitiveRegistry
Source§fn clone(&self) -> PrimitiveRegistry
fn clone(&self) -> PrimitiveRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrimitiveRegistry
impl Debug for PrimitiveRegistry
Source§impl Default for PrimitiveRegistry
impl Default for PrimitiveRegistry
Source§fn default() -> PrimitiveRegistry
fn default() -> PrimitiveRegistry
Returns the “default value” for a type. Read more
impl Eq for PrimitiveRegistry
Source§impl PartialEq for PrimitiveRegistry
impl PartialEq for PrimitiveRegistry
Source§fn eq(&self, other: &PrimitiveRegistry) -> bool
fn eq(&self, other: &PrimitiveRegistry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PrimitiveRegistry
Auto Trait Implementations§
impl Freeze for PrimitiveRegistry
impl RefUnwindSafe for PrimitiveRegistry
impl Send for PrimitiveRegistry
impl Sync for PrimitiveRegistry
impl Unpin for PrimitiveRegistry
impl UnsafeUnpin for PrimitiveRegistry
impl UnwindSafe for PrimitiveRegistry
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