pub enum Symbol {
Const {
name: Cow<'static, str>,
value: Number,
description: Option<Cow<'static, str>>,
local: bool,
},
Func {
name: Cow<'static, str>,
args: usize,
variadic: bool,
callback: fn(&[Number]) -> Result<Number, FuncError>,
description: Option<Cow<'static, str>>,
local: bool,
},
}Expand description
A symbol representing either a constant or function.
Symbols are stored in a [SymTable] and referenced during evaluation.
Variants§
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