pub struct ParseNodeXArrow {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub label: String,
pub body: Option<Box<AnyParseNode>>,
pub below: Option<Box<AnyParseNode>>,
}
Expand description
Represents extensible arrows in mathematical expressions.
This struct handles arrows that can stretch to fit their content, with optional labels above or below.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportinglabel
- The arrow type/label (e.g., “->”, “<=>”)body
- The content above the arrowbelow
- Optional content below the arrow
§LaTeX Correspondence
Corresponds to LaTeX extensible arrow commands:
\xleftarrow{f}
\xrightarrow[g]{f}
\xleftrightarrow{h}
§Usage
XArrow nodes create arrows that automatically size to fit their labels, commonly used for function mappings and transformations.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
label: String
The arrow type/label (e.g., “->”, “<=>”)
body: Option<Box<AnyParseNode>>
The content above the arrow
below: Option<Box<AnyParseNode>>
Optional content below the arrow
Trait Implementations§
Source§impl Clone for ParseNodeXArrow
impl Clone for ParseNodeXArrow
Source§fn clone(&self) -> ParseNodeXArrow
fn clone(&self) -> ParseNodeXArrow
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 ParseNodeXArrow
impl Debug for ParseNodeXArrow
Source§impl PartialEq for ParseNodeXArrow
impl PartialEq for ParseNodeXArrow
impl StructuralPartialEq for ParseNodeXArrow
Auto Trait Implementations§
impl Freeze for ParseNodeXArrow
impl RefUnwindSafe for ParseNodeXArrow
impl Send for ParseNodeXArrow
impl Sync for ParseNodeXArrow
impl Unpin for ParseNodeXArrow
impl UnwindSafe for ParseNodeXArrow
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