pub enum Element {
Part(Part),
Chapter(Chapter),
Section(Section),
Paragraph(Paragraph),
Text(Text),
Input(Input),
Environment(Environment),
UserDefined(UserDefined),
List(List),
}Expand description
Elements enum that contains all elements
- Part
- Chapter
- Section (Headers)
- Paragraph
- Text (Italic, bold, verbatim, etc.)
- Input
- Environment
(\begin{}...\end{}) - UserDefiend (any kind of custom code)
- List (enumerate or itemize)
Variants§
Part(Part)
Chapter(Chapter)
Section(Section)
Paragraph(Paragraph)
Text(Text)
Input(Input)
Environment(Environment)
UserDefined(UserDefined)
List(List)
Implementations§
Source§impl Element
impl Element
Sourcepub fn loop_through(&self) -> String
pub fn loop_through(&self) -> String
Recursive function to get latex string for all elements inside struct
Sourcepub fn loop_through_parallel(&self) -> String
pub fn loop_through_parallel(&self) -> String
Parallel version of loop_through using rayon
Trait Implementations§
Source§impl Convert for Element
impl Convert for Element
Source§fn to_latex_string(&self) -> String
fn to_latex_string(&self) -> String
Takes reference of the element and uses it’s &self.0 for the string
Source§impl From<Environment> for Element
impl From<Environment> for Element
Source§fn from(e: Environment) -> Self
fn from(e: Environment) -> Self
Converts to this type from the input type.
Source§impl From<UserDefined> for Element
impl From<UserDefined> for Element
Source§fn from(u: UserDefined) -> Self
fn from(u: UserDefined) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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