126 lines
2.4 KiB
Rust
126 lines
2.4 KiB
Rust
use super::element::Element;
|
|
use super::lesser_element::TableCell;
|
|
use super::source::Source;
|
|
|
|
#[derive(Debug)]
|
|
pub struct PlainList<'s> {
|
|
pub source: &'s str,
|
|
pub children: Vec<PlainListItem<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct PlainListItem<'s> {
|
|
pub source: &'s str,
|
|
pub indentation: usize,
|
|
pub bullet: &'s str,
|
|
pub children: Vec<Element<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct GreaterBlock<'s> {
|
|
pub source: &'s str,
|
|
pub name: &'s str,
|
|
pub parameters: Option<&'s str>,
|
|
pub children: Vec<Element<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct DynamicBlock<'s> {
|
|
pub source: &'s str,
|
|
pub name: &'s str,
|
|
pub parameters: Option<&'s str>,
|
|
pub children: Vec<Element<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct FootnoteDefinition<'s> {
|
|
pub source: &'s str,
|
|
pub label: &'s str,
|
|
pub children: Vec<Element<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct Drawer<'s> {
|
|
pub source: &'s str,
|
|
pub name: &'s str,
|
|
pub children: Vec<Element<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct PropertyDrawer<'s> {
|
|
pub source: &'s str,
|
|
pub children: Vec<NodeProperty<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct NodeProperty<'s> {
|
|
pub source: &'s str,
|
|
pub value: Option<&'s str>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct Table<'s> {
|
|
pub source: &'s str,
|
|
pub children: Vec<TableRow<'s>>,
|
|
}
|
|
|
|
#[derive(Debug)]
|
|
pub struct TableRow<'s> {
|
|
pub source: &'s str,
|
|
pub children: Vec<TableCell<'s>>,
|
|
}
|
|
|
|
impl<'s> Source<'s> for PlainList<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for PlainListItem<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for GreaterBlock<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for DynamicBlock<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for FootnoteDefinition<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for Drawer<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for PropertyDrawer<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for Table<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|
|
|
|
impl<'s> Source<'s> for TableRow<'s> {
|
|
fn get_source(&'s self) -> &'s str {
|
|
self.source
|
|
}
|
|
}
|