pub struct FunctionSpec {
pub node_type: Option<NodeType>,
pub num_args: usize,
pub arg_types: Option<Vec<ArgType>>,
pub allowed_in_argument: bool,
pub allowed_in_text: bool,
pub allowed_in_math: bool,
pub num_optional_args: usize,
pub infix: bool,
pub primitive: bool,
pub handler: Option<FunctionHandler>,
}
Expand description
Runtime function specification used during LaTeX parsing and processing.
Fields§
§node_type: Option<NodeType>
Function type name (equivalent to type
in KaTeX)
num_args: usize
Number of arguments
arg_types: Option<Vec<ArgType>>
Argument types
allowed_in_argument: bool
Allowed in argument position
allowed_in_text: bool
Allowed in text mode
allowed_in_math: bool
Allowed in math mode
num_optional_args: usize
Number of optional arguments
infix: bool
Infix operator
primitive: bool
TeX primitive
handler: Option<FunctionHandler>
Handler function
Trait Implementations§
Source§impl Clone for FunctionSpec
impl Clone for FunctionSpec
Source§fn clone(&self) -> FunctionSpec
fn clone(&self) -> FunctionSpec
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 FunctionSpec
impl Debug for FunctionSpec
Source§impl Spec for FunctionSpec
impl Spec for FunctionSpec
Source§fn num_optional_args(&self) -> usize
fn num_optional_args(&self) -> usize
Returns the number of optional arguments.
Auto Trait Implementations§
impl Freeze for FunctionSpec
impl RefUnwindSafe for FunctionSpec
impl Send for FunctionSpec
impl Sync for FunctionSpec
impl Unpin for FunctionSpec
impl UnwindSafe for FunctionSpec
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