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
TexElementwill be boxed. strandStringare converted to escapedTextelements.- Any number (
u8, …) is converted to escapedTextusing 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.