pub trait IntoTexElement {
// Required method
fn into_tex_element(self) -> Box<dyn TexElement>;
}
Expand description
Conversion trait for various types.
Used for primitive conversions of various types directly into tex elements. Implementations include:
Box<dyn TexElement>
are passed through unchanged.- Any other
TexElement
will be boxed. str
andString
are converted to escapedText
elements.- Any number (
u8
, …) is converted to escapedText
using display. - A
Vec<Box<dyn TexElement>>
is converted into aGroup
. - The unit type
()
is converted into an empty element.
Required Methods§
Sourcefn into_tex_element(self) -> Box<dyn TexElement>
fn into_tex_element(self) -> Box<dyn TexElement>
Converts the given element into a TexElement
.