pub struct ParseNodeStyling {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub style: &'static Style,
pub body: Vec<AnyParseNode>,
}
Expand description
Represents style changes applied to mathematical expressions.
This struct wraps mathematical content with style specifications like bold, italic, or other text styling attributes.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportingstyle
- The style specification (Style
)body
- The expressions to be styled
§LaTeX Correspondence
Corresponds to LaTeX styling commands:
\mathbf{x} % Bold
\mathit{f} % Italic
\mathrm{dx} % Roman/upright
§Usage
Styling nodes allow different visual appearances for mathematical symbols, useful for distinguishing vectors from scalars or emphasizing certain terms.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
style: &'static Style
The style specification (Style
)
body: Vec<AnyParseNode>
The expressions to be styled
Trait Implementations§
Source§impl Clone for ParseNodeStyling
impl Clone for ParseNodeStyling
Source§fn clone(&self) -> ParseNodeStyling
fn clone(&self) -> ParseNodeStyling
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 ParseNodeStyling
impl Debug for ParseNodeStyling
Source§impl PartialEq for ParseNodeStyling
impl PartialEq for ParseNodeStyling
impl StructuralPartialEq for ParseNodeStyling
Auto Trait Implementations§
impl Freeze for ParseNodeStyling
impl RefUnwindSafe for ParseNodeStyling
impl Send for ParseNodeStyling
impl Sync for ParseNodeStyling
impl Unpin for ParseNodeStyling
impl UnwindSafe for ParseNodeStyling
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