pub enum NodeKind {
Show 20 variants
Document,
Section,
Paragraph,
Text,
Emphasis,
Strong,
BoldItalic,
Math,
Equation,
Figure,
Image,
Table,
Citation,
Reference,
Theorem,
Footnote,
Bibliography,
Raw,
List,
ListItem,
}Expand description
The kinds of nodes Mosaic recognises (manifest §5.1).
§Examples
use mos_core::NodeKind;
let kind = NodeKind::Paragraph;
assert_eq!(kind, NodeKind::Paragraph);Variants§
Document
Section
Paragraph
Text
Emphasis
Strong
BoldItalic
Math
Equation
Figure
A captioned container — an image plus a caption paragraph, laid
out together with the caption beneath. Cross-references via
@fig:foo will target this kind once MVP 3 lands.
Image
A raster image (PNG / JPEG in MVP 1.5). The decoded pixel data
and natural dimensions live on the node’s attributes; see the
mos-eval resolver for the exact attribute names.
Table
Citation
Reference
Theorem
Footnote
Bibliography
Raw
List
A bullet or numbered list. The ordered attribute distinguishes
the two kinds and child nodes are NodeKind::ListItems.
ListItem
One entry inside a NodeKind::List. Inline children carry the
item’s text; nested NodeKind::List children describe deeper
levels.
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
Mutably borrows from an owned value. Read more