Skip to main content

AllModel

Struct AllModel 

Source
pub struct AllModel;

Trait Implementations§

Source§

impl LitModel for AllModel

Source§

type Value = AllLit

The concrete literal value type (typically an enum).
Source§

fn sorts(&self) -> &[LitSortDesc<AllLit>]

Available literal sorts.
Source§

fn ops(&self) -> &[LitOpDesc<AllLit>]

Available primitive operations on literal values.
Source§

fn sort_of(val: &AllLit) -> &'static str

Which literal sort does this value belong to?
Source§

fn is_truthy(val: &AllLit) -> bool

Is this literal value truthy? Used for comprehension filter guards.
Source§

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)>

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>>

Look up a primitive op by name.
Source§

fn is_lit_sort(&self, name: &str) -> bool

Is this identifier a literal sort name?

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.