pub struct MachineModel;Trait Implementations§
Source§impl LitModel for MachineModel
impl LitModel for MachineModel
Source§type Value = MachineLit
type Value = MachineLit
The concrete literal value type (typically an enum).
Source§fn sorts(&self) -> &[LitSortDesc<MachineLit>]
fn sorts(&self) -> &[LitSortDesc<MachineLit>]
Available literal sorts.
Source§fn ops(&self) -> &[LitOpDesc<MachineLit>]
fn ops(&self) -> &[LitOpDesc<MachineLit>]
Available primitive operations on literal values.
Source§fn sort_of(val: &MachineLit) -> &'static str
fn sort_of(val: &MachineLit) -> &'static str
Which literal sort does this value belong to?
Source§fn is_truthy(val: &MachineLit) -> bool
fn is_truthy(val: &MachineLit) -> bool
Is this literal value truthy? Used for comprehension filter guards.
Source§fn parse_as(&self, sort_name: &str, token: &str) -> Option<Self::Value>
fn parse_as(&self, sort_name: &str, token: &str) -> Option<Self::Value>
Try to parse a token as a literal of a specific sort.
Source§fn parse_any(&self, token: &str) -> Option<(&'static str, Self::Value)>
fn parse_any(&self, token: &str) -> Option<(&'static str, Self::Value)>
Try to parse a token as a literal of any sort.
Returns
(sort_name, value) on success.Source§fn find_op(&self, name: &str) -> Option<&LitOpDesc<Self::Value>>
fn find_op(&self, name: &str) -> Option<&LitOpDesc<Self::Value>>
Look up a primitive op by name.
Source§fn is_lit_sort(&self, name: &str) -> bool
fn is_lit_sort(&self, name: &str) -> bool
Is this identifier a literal sort name?
Auto Trait Implementations§
impl Freeze for MachineModel
impl RefUnwindSafe for MachineModel
impl Send for MachineModel
impl Sync for MachineModel
impl Unpin for MachineModel
impl UnsafeUnpin for MachineModel
impl UnwindSafe for MachineModel
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