pub enum TypstElementType {
Root,
Heading,
Quote,
Math,
Strong,
Emphasis,
ListItem,
EnumItem,
Raw,
}Expand description
Represents an element type in a Typst document.
Variants§
Root
Root node of the AST.
Heading
A heading element.
Quote
A quote element.
Math
A math element.
Strong
Strong text.
Emphasis
Emphasized text.
ListItem
A list item.
EnumItem
An enumeration item.
Raw
Raw content (e.g., code blocks).
Trait Implementations§
Source§impl Clone for TypstElementType
impl Clone for TypstElementType
Source§fn clone(&self) -> TypstElementType
fn clone(&self) -> TypstElementType
Returns a duplicate 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 Debug for TypstElementType
impl Debug for TypstElementType
Source§impl<'de> Deserialize<'de> for TypstElementType
impl<'de> Deserialize<'de> for TypstElementType
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 ElementType for TypstElementType
impl ElementType for TypstElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this element matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalElementRole) -> bool
fn is_universal(&self, role: UniversalElementRole) -> bool
Returns true if this element matches the specified universal role.
Source§impl From<TypstTokenType> for TypstElementType
impl From<TypstTokenType> for TypstElementType
Source§fn from(token: TypstTokenType) -> Self
fn from(token: TypstTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for TypstElementType
impl Hash for TypstElementType
Source§impl PartialEq for TypstElementType
impl PartialEq for TypstElementType
Source§impl Serialize for TypstElementType
impl Serialize for TypstElementType
impl Copy for TypstElementType
impl Eq for TypstElementType
impl StructuralPartialEq for TypstElementType
Auto Trait Implementations§
impl Freeze for TypstElementType
impl RefUnwindSafe for TypstElementType
impl Send for TypstElementType
impl Sync for TypstElementType
impl Unpin for TypstElementType
impl UnsafeUnpin for TypstElementType
impl UnwindSafe for TypstElementType
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