pub struct SyntaxTree<'t> {
pub elements: Vec<Element<'t>>,
pub table_of_contents: Vec<Element<'t>>,
pub html_blocks: Vec<Cow<'t, str>>,
pub code_blocks: Vec<CodeBlock<'t>>,
pub footnotes: Vec<Vec<Element<'t>>>,
pub needs_footnote_block: bool,
pub bibliographies: BibliographyList<'t>,
pub wikitext_len: usize,
}Fields§
§elements: Vec<Element<'t>>The list of elements that compose this tree.
Note that each Element<'t> can contain other elements within it,
and these as well, etc. This structure composes the depth of the
syntax tree.
table_of_contents: Vec<Element<'t>>The full table of contents for this page.
Depth list conversion happens here, so that depths on the table match the heading level.
html_blocks: Vec<Cow<'t, str>>The full list of HTML blocks for this page.
code_blocks: Vec<CodeBlock<'t>>The full list of code blocks for this page.
footnotes: Vec<Vec<Element<'t>>>The full footnote list for this page.
needs_footnote_block: boolWhether the renderer should add its own footnote block.
This is true if there is no footnote block in the element list above, and there are footnotes to render.
bibliographies: BibliographyList<'t>The full list of bibliographies for this page.
wikitext_len: usizeHint for the size of the wikitext input.
This is an optimization to make rendering large parges slightly faster.
Implementations§
Source§impl<'t> SyntaxTree<'t>
impl<'t> SyntaxTree<'t>
pub fn to_owned(&self) -> SyntaxTree<'static>
Trait Implementations§
Source§impl<'t> Clone for SyntaxTree<'t>
impl<'t> Clone for SyntaxTree<'t>
Source§fn clone(&self) -> SyntaxTree<'t>
fn clone(&self) -> SyntaxTree<'t>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'t> Debug for SyntaxTree<'t>
impl<'t> Debug for SyntaxTree<'t>
Source§impl<'t> Default for SyntaxTree<'t>
impl<'t> Default for SyntaxTree<'t>
Source§fn default() -> SyntaxTree<'t>
fn default() -> SyntaxTree<'t>
Source§impl<'de, 't> Deserialize<'de> for SyntaxTree<'t>
impl<'de, 't> Deserialize<'de> for SyntaxTree<'t>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'t> PartialEq for SyntaxTree<'t>
impl<'t> PartialEq for SyntaxTree<'t>
Source§impl<'t> Serialize for SyntaxTree<'t>
impl<'t> Serialize for SyntaxTree<'t>
impl<'t> Eq for SyntaxTree<'t>
impl<'t> StructuralPartialEq for SyntaxTree<'t>
Auto Trait Implementations§
impl<'t> Freeze for SyntaxTree<'t>
impl<'t> RefUnwindSafe for SyntaxTree<'t>
impl<'t> Send for SyntaxTree<'t>
impl<'t> Sync for SyntaxTree<'t>
impl<'t> Unpin for SyntaxTree<'t>
impl<'t> UnwindSafe for SyntaxTree<'t>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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§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
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more