Enum Name

Source
pub enum Name {
    Entity(u64),
    Value(u64),
    ConstantEntity(String),
    ConstantValue(String),
}
Expand description

Name of an entity instance or a value

Corresponding to parser::token::rhs_occurrence_name and parser::token::lhs_occurrence_name

Variants§

§

Entity(u64)

Like #11, corresponds to parser::token::entity_instance_name

§

Value(u64)

Like @11, corresponds to parser::token::value_instance_name

§

ConstantEntity(String)

Like #CONST_ENTITY, corresponds to parser::token::constant_entity_name

§

ConstantValue(String)

Like @CONST_VALUE, corresponds to parser::token::constant_value_name

Trait Implementations§

Source§

impl AST for Name

Source§

fn parse(input: &str) -> ParseResult<'_, Self>

Source§

impl Clone for Name

Source§

fn clone(&self) -> Name

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Name

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, 'name> EnumAccess<'de> for &'name Name

Source§

type Error = Error

The error type that can be returned if some error occurs during deserialization.
Source§

type Variant = &'name Name

The Visitor that will be used to deserialize the content of the enum variant.
Source§

fn variant_seed<V>(self, seed: V) -> Result<(V::Value, Self::Variant)>
where V: DeserializeSeed<'de>,

variant is called to identify which variant to deserialize. Read more
Source§

fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error>
where V: Deserialize<'de>,

variant is called to identify which variant to deserialize. Read more
Source§

impl From<Name> for Parameter

Source§

fn from(original: Name) -> Parameter

Converts to this type from the input type.
Source§

impl<T> From<Name> for PlaceHolder<T>

Source§

fn from(rvalue: Name) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Name

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(input: &str) -> Result<Self>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for Name

Source§

fn eq(&self, other: &Name) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'de, 'name> VariantAccess<'de> for &'name Name

Source§

type Error = Error

The error type that can be returned if some error occurs during deserialization. Must match the error type of our EnumAccess.
Source§

fn unit_variant(self) -> Result<()>

Called when deserializing a variant with no values. Read more
Source§

fn newtype_variant_seed<D>(self, seed: D) -> Result<D::Value>
where D: DeserializeSeed<'de>,

Called when deserializing a variant with a single value. Read more
Source§

fn tuple_variant<V>(self, _len: usize, _visitor: V) -> Result<V::Value>
where V: Visitor<'de>,

Called when deserializing a tuple-like variant. Read more
Source§

fn struct_variant<V>( self, _fields: &'static [&'static str], _visitor: V, ) -> Result<V::Value>
where V: Visitor<'de>,

Called when deserializing a struct-like variant. Read more
Source§

fn newtype_variant<T>(self) -> Result<T, Self::Error>
where T: Deserialize<'de>,

Called when deserializing a variant with a single value. Read more
Source§

impl StructuralPartialEq for Name

Auto Trait Implementations§

§

impl Freeze for Name

§

impl RefUnwindSafe for Name

§

impl Send for Name

§

impl Sync for Name

§

impl Unpin for Name

§

impl UnwindSafe for Name

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.