pub struct CSInterner<C: Character> { /* private fields */ }Expand description
A CSHandler that interns control sequence names as u32.
Implementations§
Source§impl<C: Character> CSInterner<C>
impl<C: Character> CSInterner<C>
Sourcepub fn from_static(&mut self, s: &'static str) -> InternedCSName<C>
pub fn from_static(&mut self, s: &'static str) -> InternedCSName<C>
Interns a &'static str as a control sequence name
Sourcepub fn from_string<S: AsRef<str>>(&mut self, s: S) -> InternedCSName<C>
pub fn from_string<S: AsRef<str>>(&mut self, s: S) -> InternedCSName<C>
Interns a String as a control sequence name
Sourcepub fn resolve(&self, i: InternedCSName<C>) -> &[C]
pub fn resolve(&self, i: InternedCSName<C>) -> &[C]
Resolves a control sequence name to a sequence of Characters
pub fn intern(&mut self, v: &[C]) -> InternedCSName<C>
Trait Implementations§
Source§impl<C: Character> CSHandler<C, (NonZero<u32>, PhantomData<C>)> for CSInterner<C>
impl<C: Character> CSHandler<C, (NonZero<u32>, PhantomData<C>)> for CSInterner<C>
Source§type Resolved<'a> = DisplayCSName<'a, C>
type Resolved<'a> = DisplayCSName<'a, C>
The type of the resolved control sequence name (for displaying / iterating over the underlying
Characters.Source§fn cs_from_str(&mut self, s: &str) -> InternedCSName<C>
fn cs_from_str(&mut self, s: &str) -> InternedCSName<C>
Creates a new control sequence name from a string.
Source§fn get(&self, s: &str) -> Option<InternedCSName<C>>
fn get(&self, s: &str) -> Option<InternedCSName<C>>
Creates a control sequence name from a string slice iff it is a previously interned control sequence name.
Source§fn cs_from_chars(&mut self, v: &[C]) -> InternedCSName<C>
fn cs_from_chars(&mut self, v: &[C]) -> InternedCSName<C>
Creates a new control sequence name from a vector of characters.
Source§fn par(&self) -> InternedCSName<C>
fn par(&self) -> InternedCSName<C>
Returns the name of the
\par control sequence.Source§fn empty_str(&self) -> InternedCSName<C>
fn empty_str(&self) -> InternedCSName<C>
Returns the name of the empty control sequence.
Source§fn resolve<'a>(&'a self, cs: &InternedCSName<C>) -> DisplayCSName<'a, C>
fn resolve<'a>(&'a self, cs: &InternedCSName<C>) -> DisplayCSName<'a, C>
Resolves a control sequence name.
Source§impl<C: Clone + Character> Clone for CSInterner<C>
impl<C: Clone + Character> Clone for CSInterner<C>
Source§fn clone(&self) -> CSInterner<C>
fn clone(&self) -> CSInterner<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<C> Freeze for CSInterner<C>
impl<C> RefUnwindSafe for CSInterner<C>where
C: RefUnwindSafe,
impl<C> Send for CSInterner<C>where
C: Send,
impl<C> Sync for CSInterner<C>where
C: Sync,
impl<C> Unpin for CSInterner<C>where
C: Unpin,
impl<C> UnsafeUnpin for CSInterner<C>
impl<C> UnwindSafe for CSInterner<C>where
C: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().