pub enum StandardToken<Char, CS>{
ControlSequence(CS),
Character(Char, CommandCode),
Primitive(PrimitiveIdentifier),
}Expand description
Variantsยง
Trait Implementationsยง
Sourceยงimpl<Char, CS> Clone for StandardToken<Char, CS>
impl<Char, CS> Clone for StandardToken<Char, CS>
Sourceยงfn clone(&self) -> StandardToken<Char, CS>
fn clone(&self) -> StandardToken<Char, CS>
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 moreSourceยงimpl<Char, CS> Debug for StandardToken<Char, CS>
impl<Char, CS> Debug for StandardToken<Char, CS>
Sourceยงimpl<Char, CS> PartialEq for StandardToken<Char, CS>
impl<Char, CS> PartialEq for StandardToken<Char, CS>
Sourceยงimpl<Char, CS> Token for StandardToken<Char, CS>
impl<Char, CS> Token for StandardToken<Char, CS>
Sourceยงtype CS = CS
type CS = CS
The
CSName type used for control sequence names (e.g. Rc<str> or something interned).Sourceยงfn to_enum(&self) -> StandardToken<Char, CS>
fn to_enum(&self) -> StandardToken<Char, CS>
Converts to the canonical enum representation of a token, i.e.
StandardToken.Sourceยงfn from_cs(cs: CS) -> StandardToken<Char, CS>
fn from_cs(cs: CS) -> StandardToken<Char, CS>
Create a new token from a control sequence name.
Sourceยงfn space() -> StandardToken<Char, CS>
fn space() -> StandardToken<Char, CS>
Create a new space token.
Sourceยงfn eof() -> StandardToken<Char, CS>
fn eof() -> StandardToken<Char, CS>
Create a new end-of-file token.
Sourceยงfn from_char_cat(c: Char, cat: CommandCode) -> StandardToken<Char, CS>
fn from_char_cat(c: Char, cat: CommandCode) -> StandardToken<Char, CS>
Create a new character token with given
CommandCode (i.e.
conceptually the CategoryCode).Sourceยงfn primitive(id: PrimitiveIdentifier) -> StandardToken<Char, CS>
fn primitive(id: PrimitiveIdentifier) -> StandardToken<Char, CS>
Sourceยงfn argument_marker(i: u8) -> StandardToken<Char, CS>
fn argument_marker(i: u8) -> StandardToken<Char, CS>
Create a new argument marker token.
i needs to be in the range 0..=8.Sourceยงfn char_value(&self) -> Option<Self::Char>
fn char_value(&self) -> Option<Self::Char>
The
Character value of this token, if it is a character token.Sourceยงfn command_code(&self) -> CommandCode
fn command_code(&self) -> CommandCode
The
CommandCode (i.e. conceptually the CategoryCode) of this token.Sourceยงfn is_cs_or_active(&self) -> bool
fn is_cs_or_active(&self) -> bool
Check if this token is a control sequence or an active character
Sourceยงfn is_cs(&self, name: &Self::CS) -> bool
fn is_cs(&self, name: &Self::CS) -> bool
Check if this token is a control sequence with the given name.
fn is_primitive(&self) -> Option<PrimitiveIdentifier>
Sourceยงfn is_argument_marker(&self) -> Option<u8>
fn is_argument_marker(&self) -> Option<u8>
Check if this token is a argument token, and if so, return its number (in the range
0..=8).Sourceยงfn display_fmt<W>(
&self,
int: &<Self::CS as CSName<Self::Char>>::Handler,
cc: &<Self::Char as Character>::CharMap<CategoryCode>,
escapechar: Option<Self::Char>,
f: &mut W,
) -> Result<(), Error>where
W: Write,
fn display_fmt<W>(
&self,
int: &<Self::CS as CSName<Self::Char>>::Handler,
cc: &<Self::Char as Character>::CharMap<CategoryCode>,
escapechar: Option<Self::Char>,
f: &mut W,
) -> Result<(), Error>where
W: Write,
Display this token to a writer, using the given
CSHandler (in case it is a control sequence).
In that case, we also need the current \escapechar to optionally insert it in front of the control sequence
name, and the current CategoryCodeScheme to determine whether or not to insert a space afterwards - which
we do unless the control sequence name is a single character with any CommandCode other than
Letter.impl<Char, CS> Copy for StandardToken<Char, CS>
impl<Char, CS> Eq for StandardToken<Char, CS>
Auto Trait Implementationsยง
impl<Char, CS> Freeze for StandardToken<Char, CS>
impl<Char, CS> RefUnwindSafe for StandardToken<Char, CS>where
CS: RefUnwindSafe,
Char: RefUnwindSafe,
impl<Char, CS> Send for StandardToken<Char, CS>
impl<Char, CS> Sync for StandardToken<Char, CS>
impl<Char, CS> Unpin for StandardToken<Char, CS>
impl<Char, CS> UnwindSafe for StandardToken<Char, CS>where
CS: UnwindSafe,
Char: 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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Anyโs vtable from &Traitโs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Anyโs vtable from &mut Traitโs.ยงimpl<T> DowncastSend for T
impl<T> DowncastSend for T
ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
ยงimpl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Patch<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Post<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, T, Request, Encoding> FromReq<Put<Encoding>, Request, E> for Twhere
Request: Req<E> + Send + 'static,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Patch<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Post<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
ยงimpl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
impl<E, Encoding, Response, T> FromRes<Put<Encoding>, Response, E> for Twhere
Response: ClientRes<E> + Send,
Encoding: Decodes<T>,
E: FromServerFnError,
ยง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<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Patch<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Post<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
ยงimpl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
impl<E, T, Encoding, Request> IntoReq<Put<Encoding>, Request, E> for Twhere
Request: ClientReq<E>,
Encoding: Encodes<T>,
E: FromServerFnError,
ยงimpl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Patch<Encoding>, Response, E> for T
ยงimpl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Post<Encoding>, Response, E> for T
ยงimpl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
impl<E, Response, Encoding, T> IntoRes<Put<Encoding>, Response, E> for T
ยงimpl<T> Pointable for T
impl<T> Pointable for T
ยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
ยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
ยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
ยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.