pub enum OutputToken<S> {
Open(Scope<S>),
Close,
Text(String),
Verbatim(String),
Annotated(Annotation),
}Expand description
A token emitted by the engine after hanja conversion.
Most tokens pass through from InputToken, but converted dictionary matches
become Annotated so middlewares and renderers can choose their final
surface form.
Variants§
Open(Scope<S>)
Enters a structural scope.
Close
Leaves the most recent structural scope.
Text(String)
Text that needs no annotation-aware rendering.
Verbatim(String)
Text that must pass through untouched.
Annotated(Annotation)
A converted hanja word plus metadata for later stages.
Trait Implementations§
Source§impl<S> Clone for OutputToken<S>where
S: Clone,
impl<S> Clone for OutputToken<S>where
S: Clone,
Source§fn clone(&self) -> OutputToken<S>
fn clone(&self) -> OutputToken<S>
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<S> Debug for OutputToken<S>where
S: Debug,
impl<S> Debug for OutputToken<S>where
S: Debug,
Source§impl<S> PartialEq for OutputToken<S>where
S: PartialEq,
impl<S> PartialEq for OutputToken<S>where
S: PartialEq,
Source§fn eq(&self, other: &OutputToken<S>) -> bool
fn eq(&self, other: &OutputToken<S>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<S> Eq for OutputToken<S>where
S: Eq,
impl<S> StructuralPartialEq for OutputToken<S>
Auto Trait Implementations§
impl<S> Freeze for OutputToken<S>where
S: Freeze,
impl<S> RefUnwindSafe for OutputToken<S>where
S: RefUnwindSafe,
impl<S> Send for OutputToken<S>where
S: Send,
impl<S> Sync for OutputToken<S>where
S: Sync,
impl<S> Unpin for OutputToken<S>where
S: Unpin,
impl<S> UnsafeUnpin for OutputToken<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for OutputToken<S>where
S: 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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.