pub struct ParseNodeSqrt {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub body: AnyParseNode,
pub index: Option<AnyParseNode>,
}
Expand description
Represents square roots and nth roots in mathematical expressions.
This struct handles radical expressions with optional indices for nth roots.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportingbody
- The expression under the radicalindex
- Optional index for nth roots
§LaTeX Correspondence
Corresponds to LaTeX radical commands:
\sqrt{x} % Square root
\sqrt[3]{x} % Cube root
\sqrt[n]{x} % nth root
§Usage
Sqrt nodes represent radical expressions, automatically sizing the radical symbol to fit the content and handling nth root indices.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
body: AnyParseNode
The expression under the radical
index: Option<AnyParseNode>
Optional index for nth roots
Trait Implementations§
Source§impl Clone for ParseNodeSqrt
impl Clone for ParseNodeSqrt
Source§fn clone(&self) -> ParseNodeSqrt
fn clone(&self) -> ParseNodeSqrt
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 ParseNodeSqrt
impl Debug for ParseNodeSqrt
Source§impl PartialEq for ParseNodeSqrt
impl PartialEq for ParseNodeSqrt
impl StructuralPartialEq for ParseNodeSqrt
Auto Trait Implementations§
impl Freeze for ParseNodeSqrt
impl RefUnwindSafe for ParseNodeSqrt
impl Send for ParseNodeSqrt
impl Sync for ParseNodeSqrt
impl Unpin for ParseNodeSqrt
impl UnwindSafe for ParseNodeSqrt
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