Skip to main content

CSName

Trait CSName 

Source
pub trait CSName<C: Character>:
    Clone
    + Eq
    + 'static
    + Hash
    + Debug {
    type Handler: CSHandler<C, Self>;
    type Map<A>: CSNameMap<C, Self, A>
       where A: Clone;

    // Required method
    fn id(&self) -> usize;

    // Provided method
    fn display_fmt<W: Write>(
        &self,
        int: &Self::Handler,
        cc: &CategoryCodeScheme<C>,
        escapechar: Option<C>,
        f: &mut W,
    ) -> Result { ... }
}
Expand description

The name of a control sequence.

Required Associated Types§

Source

type Handler: CSHandler<C, Self>

The type of the handler for this control sequence name.

Source

type Map<A>: CSNameMap<C, Self, A> where A: Clone

The type used for mapping control sequence names to e.g. Commands.

Required Methods§

Source

fn id(&self) -> usize

Provided Methods§

Source

fn display_fmt<W: Write>( &self, int: &Self::Handler, cc: &CategoryCodeScheme<C>, escapechar: Option<C>, f: &mut W, ) -> Result

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C: Character> CSName<C> for Ptr<str>

Source§

type Handler = ()

Source§

type Map<A> = HashMap<Arc<str>, A, FxBuildHasher> where A: Clone

Source§

impl<C: Character> CSName<C> for InternedCSName<C>

Source§

type Handler = CSInterner<C>

Source§

type Map<A> = CSNameVec<C, A> where A: Clone