pub enum Symbol {
Const {
name: Cow<'static, str>,
value: Decimal,
description: Option<Cow<'static, str>>,
},
Func {
name: Cow<'static, str>,
args: usize,
variadic: bool,
callback: fn(&[Decimal]) -> Result<Decimal, FuncError>,
description: Option<Cow<'static, str>>,
},
}Expand description
What a symbol represents in the language.
Variants§
Const
Named constant (e.g., pi). Returns a Decimal for now.
Func
Function with specified arity and callback.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
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