#[non_exhaustive]pub enum NodeKind {
Show 19 variants
Ruby,
Bouten,
TateChuYoko,
Gaiji,
Indent,
AlignEnd,
Warichu,
Keigakomi,
PageBreak,
SectionBreak,
AozoraHeading,
HeadingHint,
Sashie,
Kaeriten,
Annotation,
DoubleRuby,
Container,
ContainerOpen,
ContainerClose,
}Expand description
Cross-cutting tag for an AST node or NodeRef projection.
The first 17 variants (Self::Ruby through Self::Container)
project from crate::borrowed::AozoraNode’s discriminant. The
final two (Self::ContainerOpen / Self::ContainerClose)
only arise from crate::borrowed::NodeRef’s container open /
close variants — the inline Container payload uses
Self::Container.
#[non_exhaustive] so adding a new AozoraNode variant only needs
to land here and on the per-call match sites; existing wire
consumers see the new variant as an unrecognised tag and gracefully
degrade (the camelCase mapping is exhaustive within this crate;
downstream match over NodeKind is required to handle a _ arm
for forward-compat).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ruby
Ruby annotation (|base《reading》).
Bouten
Bouten (傍点) — emphasis dots over a span.
TateChuYoko
縦中横 (tate-chu-yoko) — horizontal text inside vertical run.
Gaiji
外字 (gaiji) — non-Unicode character reference.
Indent
Inline indent (字下げ) marker.
AlignEnd
Right-edge alignment (字上げ) marker.
Warichu
割注 (warichu) — split-line annotation.
Keigakomi
罫囲み (keigakomi) — ruled box.
PageBreak
改ページ (page break).
SectionBreak
Section break (大見出し系統合).
AozoraHeading
Aozora heading (見出し).
HeadingHint
Heading hint that informs downstream rendering decisions.
Sashie
挿絵 (sashie) — illustration reference.
Kaeriten
返り点 (kaeriten) — kanbun reading marker.
Annotation
Generic annotation that no specific recogniser claimed.
DoubleRuby
Double ruby (《《…》》).
Container
Inline-attached container (字下げ系の AozoraNode 包み込み).
ContainerOpen
NodeRef::BlockOpen projection — paired-container open
sentinel position.
ContainerClose
NodeRef::BlockClose projection — paired-container close
sentinel position.
Implementations§
Source§impl NodeKind
impl NodeKind
Sourcepub const ALL: [Self; 19]
pub const ALL: [Self; 19]
Every variant in declaration order.
Used by aozora kinds (CLI introspection) and the
TypeScript / JSON-Schema codegen so the artefact list
tracks the enum without a hand-maintained parallel.
Sourcepub const fn as_camel_case(self) -> &'static str
pub const fn as_camel_case(self) -> &'static str
Stable camelCase string identifier for this kind.
Driver crates (aozora-ffi / aozora-wasm / aozora-py) all
emit JSON whose kind field equals this string verbatim, so
downstream TypeScript / Python / C consumers can switch on the
tag without consulting an out-of-band table.
Trait Implementations§
impl Copy for NodeKind
impl Eq for NodeKind
impl StructuralPartialEq for NodeKind
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
impl UnwindSafe for NodeKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more