Enum rbop::node::unstructured::UnstructuredNode
source · [−]pub enum UnstructuredNode {
Token(Token),
Sqrt(UnstructuredNodeList),
Fraction(UnstructuredNodeList, UnstructuredNodeList),
Parentheses(UnstructuredNodeList),
Power(UnstructuredNodeList),
FunctionCall(Function, Vec<UnstructuredNodeList>),
}
Expand description
An unstructured node is one which can be inputted by the user. Unstructured nodes have as little structure as possible - for example, “2+3*5” is represented as a flat list of tokens, with no respect for precedence.
Variants
Token(Token)
Sqrt(UnstructuredNodeList)
Fraction(UnstructuredNodeList, UnstructuredNodeList)
Parentheses(UnstructuredNodeList)
Power(UnstructuredNodeList)
FunctionCall(Function, Vec<UnstructuredNodeList>)
Implementations
sourceimpl UnstructuredNode
impl UnstructuredNode
sourcepub fn new_function_call(func: Function) -> Self
pub fn new_function_call(func: Function) -> Self
Creates a new UnstructuredNode::FunctionCall
given a function.
Trait Implementations
sourceimpl Clone for UnstructuredNode
impl Clone for UnstructuredNode
sourcefn clone(&self) -> UnstructuredNode
fn clone(&self) -> UnstructuredNode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UnstructuredNode
impl Debug for UnstructuredNode
sourceimpl Layoutable for UnstructuredNode
impl Layoutable for UnstructuredNode
sourcefn layout(
&self,
renderer: &mut impl Renderer,
path: Option<&mut NavPathNavigator<'_>>,
properties: LayoutComputationProperties
) -> LayoutBlock
fn layout(
&self,
renderer: &mut impl Renderer,
path: Option<&mut NavPathNavigator<'_>>,
properties: LayoutComputationProperties
) -> LayoutBlock
Computes the layout for a node tree, converting it into a set of glyphs at particular locations. Read more
Given a navigation path, returns the node from following that path, and the index into that node. The navigation path will always terminate on an unstructured node list, so the final index in the path will be an index into the unstructured node list’s items. Read more
sourceimpl PartialEq<UnstructuredNode> for UnstructuredNode
impl PartialEq<UnstructuredNode> for UnstructuredNode
sourcefn eq(&self, other: &UnstructuredNode) -> bool
fn eq(&self, other: &UnstructuredNode) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UnstructuredNode) -> bool
fn ne(&self, other: &UnstructuredNode) -> bool
This method tests for !=
.
sourceimpl Serializable for UnstructuredNode
impl Serializable for UnstructuredNode
sourceimpl Upgradable for UnstructuredNode
impl Upgradable for UnstructuredNode
fn upgrade(&self) -> Result<StructuredNode, NodeError>
impl Eq for UnstructuredNode
impl StructuralEq for UnstructuredNode
impl StructuralPartialEq for UnstructuredNode
Auto Trait Implementations
impl RefUnwindSafe for UnstructuredNode
impl Send for UnstructuredNode
impl Sync for UnstructuredNode
impl Unpin for UnstructuredNode
impl UnwindSafe for UnstructuredNode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more