Struct ftml::tree::SyntaxTree
source · pub struct SyntaxTree<'t> {
pub elements: Vec<Element<'t>>,
pub table_of_contents: Vec<Element<'t>>,
pub footnotes: Vec<Vec<Element<'t>>>,
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.
footnotes: Vec<Vec<Element<'t>>>The full footnote list for this page.
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>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'t> PartialEq for SyntaxTree<'t>
impl<'t> PartialEq for SyntaxTree<'t>
source§fn eq(&self, other: &SyntaxTree<'t>) -> bool
fn eq(&self, other: &SyntaxTree<'t>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'t> Serialize for SyntaxTree<'t>
impl<'t> Serialize for SyntaxTree<'t>
impl<'t> Eq for SyntaxTree<'t>
impl<'t> StructuralEq for SyntaxTree<'t>
impl<'t> StructuralPartialEq for SyntaxTree<'t>
Auto Trait Implementations§
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more