pub struct ParseNodePhantom {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub body: Vec<AnyParseNode>,
}
Expand description
Represents phantom content for spacing purposes.
This struct handles invisible content that affects layout and spacing without being visible in the final output.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportingbody
- The phantom content (invisible but affects spacing)
§LaTeX Correspondence
Corresponds to LaTeX phantom commands:
\phantom{x} % Invisible but takes space
\hphantom{y} % Horizontal space only
\vphantom{z} % Vertical space only
§Usage
Phantom nodes allow precise control over spacing and alignment by including invisible content that affects layout calculations.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
body: Vec<AnyParseNode>
The phantom content (invisible but affects spacing)
Trait Implementations§
Source§impl Clone for ParseNodePhantom
impl Clone for ParseNodePhantom
Source§fn clone(&self) -> ParseNodePhantom
fn clone(&self) -> ParseNodePhantom
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 ParseNodePhantom
impl Debug for ParseNodePhantom
Source§impl PartialEq for ParseNodePhantom
impl PartialEq for ParseNodePhantom
impl StructuralPartialEq for ParseNodePhantom
Auto Trait Implementations§
impl Freeze for ParseNodePhantom
impl RefUnwindSafe for ParseNodePhantom
impl Send for ParseNodePhantom
impl Sync for ParseNodePhantom
impl Unpin for ParseNodePhantom
impl UnwindSafe for ParseNodePhantom
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