Component

Enum Component 

Source
pub enum Component {
Show 20 variants Part(Part), Chapter(Chapter), Section(Section), Subsection(Subsection), Paragraph(Paragraph), Line(Line), Frame(Frame), Block(Block), Input(Input), Environment(Environment), List(List), Figure(Figure), TextChunk(TextChunk), Command(String), Image(Image), Table(Table), Row(Row), Builtin(Builtin), Label(Label), Reference(Reference),
}
Expand description

One of the main structs, almost everything you put into a document is a Component

Variants§

§

Part(Part)

§

Chapter(Chapter)

§

Section(Section)

§

Subsection(Subsection)

§

Paragraph(Paragraph)

§

Line(Line)

§

Frame(Frame)

§

Block(Block)

§

Input(Input)

§

Environment(Environment)

§

List(List)

§

Figure(Figure)

§

TextChunk(TextChunk)

§

Command(String)

§

Image(Image)

Outside the figure environment. Sometimes useful.

§

Table(Table)

§

Row(Row)

§

Builtin(Builtin)

§

Label(Label)

§

Reference(Reference)

Implementations§

Source§

impl Component

Source

pub fn rank(&self) -> u8

Trait Implementations§

Source§

impl AsLatex for Component

Source§

impl Clone for Component

Source§

fn clone(&self) -> Component

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Component

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Block> for Component

Source§

fn from(value: Block) -> Self

Converts to this type from the input type.
Source§

impl From<Builtin> for Component

Source§

fn from(value: Builtin) -> Self

Converts to this type from the input type.
Source§

impl From<Chapter> for Component

Source§

fn from(value: Chapter) -> Self

Converts to this type from the input type.
Source§

impl From<Environment> for Component

Source§

fn from(value: Environment) -> Self

Converts to this type from the input type.
Source§

impl From<Figure> for Component

Source§

fn from(value: Figure) -> Self

Converts to this type from the input type.
Source§

impl From<Frame> for Component

Source§

fn from(value: Frame) -> Self

Converts to this type from the input type.
Source§

impl From<Image> for Component

Source§

fn from(value: Image) -> Self

Converts to this type from the input type.
Source§

impl From<Input> for Component

Source§

fn from(value: Input) -> Self

Converts to this type from the input type.
Source§

impl From<Label> for Component

Source§

fn from(value: Label) -> Self

Converts to this type from the input type.
Source§

impl From<Line> for Component

Source§

fn from(value: Line) -> Self

Converts to this type from the input type.
Source§

impl From<List> for Component

Source§

fn from(value: List) -> Self

Converts to this type from the input type.
Source§

impl From<Paragraph> for Component

Source§

fn from(value: Paragraph) -> Self

Converts to this type from the input type.
Source§

impl From<Part> for Component

Source§

fn from(value: Part) -> Self

Converts to this type from the input type.
Source§

impl From<Reference> for Component

Source§

fn from(value: Reference) -> Self

Converts to this type from the input type.
Source§

impl From<Row> for Component

Source§

fn from(value: Row) -> Self

Converts to this type from the input type.
Source§

impl From<Section> for Component

Source§

fn from(value: Section) -> Self

Converts to this type from the input type.
Source§

impl From<Subsection> for Component

Source§

fn from(value: Subsection) -> Self

Converts to this type from the input type.
Source§

impl From<Table> for Component

Source§

fn from(value: Table) -> Self

Converts to this type from the input type.
Source§

impl From<TextChunk> for Component

Source§

fn from(value: TextChunk) -> Self

Converts to this type from the input type.
Source§

impl Populate for Component

Source§

fn attach(&mut self, other: Component) -> TexResult<&mut Self>

Weird return type for chaining attaches.
Source§

fn attach_vec(&mut self, other: Vec<Component>) -> TexResult<&mut Self>

Source§

fn attach_iter<I: Iterator<Item = Component>>( &mut self, other: I, ) -> TexResult<&mut Self>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.