pub struct FunctionSpec {
pub names: Vec<String>,
pub num_args: usize,
pub num_optional_args: usize,
pub arg_types: Vec<ArgType>,
pub allowed_in_argument: bool,
pub allowed_in_text: bool,
pub allowed_in_math: bool,
pub infix: bool,
pub primitive: bool,
pub primitive_after_missing_optional: Option<usize>,
pub handler: Option<FunctionHandler>,
}Expand description
The declaration of a function (name, arguments, handler).
Fields§
§names: Vec<String>§num_args: usize§num_optional_args: usize§arg_types: Vec<ArgType>§allowed_in_argument: bool§allowed_in_text: bool§allowed_in_math: bool§infix: bool§primitive: bool§primitive_after_missing_optional: Option<usize>§handler: Option<FunctionHandler>Implementations§
Source§impl FunctionSpec
impl FunctionSpec
pub fn is_expandable(&self) -> bool
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 (const: unstable) · 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
Auto Trait Implementations§
impl Freeze for FunctionSpec
impl RefUnwindSafe for FunctionSpec
impl Send for FunctionSpec
impl Sync for FunctionSpec
impl Unpin for FunctionSpec
impl UnsafeUnpin 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