pub struct OperDefs { /* private fields */ }Implementations§
Source§impl OperDefs
impl OperDefs
pub fn new() -> Self
pub fn try_from_ops(arena: &Arena, ops: Term) -> Result<Self>
pub fn len(&self) -> usize
pub fn lookup(&self, name: &str) -> Option<usize>
pub fn get(&self, index: Option<usize>) -> &OperDefTab
Sourcepub fn define_oper(&mut self, arena: &Arena, op: Term) -> Result<()>
pub fn define_oper(&mut self, arena: &Arena, op: Term) -> Result<()>
Accepts Term ‘op’( oper: atom | func(arg: atom | ‘=’(name: atom, default: term)),…), type: ‘fun’ | ‘prefix’ | ‘infix’ | ‘postfix’, prec: 0(min)..1200(max), % must be 0 for fixity = ‘none’ assoc: ‘none’ | ‘left’ | ‘right’, rename_to: ‘none’ | some( new_name: atom ), embed_type = ‘false’ | ‘true’, )
pub fn define_opers(&mut self, arena: &Arena, term: Term) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OperDefs
impl RefUnwindSafe for OperDefs
impl Send for OperDefs
impl Sync for OperDefs
impl Unpin for OperDefs
impl UnwindSafe for OperDefs
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