pub struct Annotation {
pub hanja: String,
pub reading: String,
pub homophone: bool,
pub require_hanja: bool,
pub require_hangul: bool,
pub first_in_context: bool,
pub skip_annotation: bool,
pub from_dictionary: bool,
}Expand description
Metadata for a dictionary-backed hanja conversion.
The engine fills this value when it turns source hanja into a hangul reading. The flags describe known constraints; middlewares may adjust them before a renderer chooses the concrete output form.
Fields§
§hanja: StringThe original hanja text from the input.
reading: StringThe hangul reading selected for the hanja text.
homophone: boolWhether another hanja form in the active context shares this reading.
require_hanja: boolWhether rendered output must keep the original hanja visible.
require_hangul: boolWhether rendered output must include a hangul gloss when hanja remains primary.
first_in_context: boolWhether this is the first occurrence in the active context window.
skip_annotation: boolWhether renderers should collapse this annotation to its primary plain text form instead of adding annotation markup or parentheses.
from_dictionary: boolWhether this annotation came from a dictionary match.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Annotation
impl Debug for Annotation
Source§impl PartialEq for Annotation
impl PartialEq for Annotation
Source§fn eq(&self, other: &Annotation) -> bool
fn eq(&self, other: &Annotation) -> bool
self and other values to be equal, and is used by ==.