Struct pax_manifest::ExpressionSpecInvocation

source ·
pub struct ExpressionSpecInvocation {
    pub root_identifier: String,
    pub escaped_identifier: String,
    pub stack_offset: usize,
    pub fully_qualified_properties_struct_type: String,
    pub fully_qualified_iterable_type: String,
    pub is_numeric: bool,
    pub is_bool: bool,
    pub is_string: bool,
    pub property_flags: PropertyDefinitionFlags,
    pub nested_symbol_tail_literal: String,
    pub is_nested_numeric: bool,
}
Expand description

The spec of an expression invocation, the necessary configuration for initializing a pointer to (or copy of, in some cases) the data behind a symbol. For example, if an expression uses i, that i needs to be “invoked,” bound dynamically to some data on the other side of i for the context of a particular expression. ExpressionSpecInvocation holds the recipe for such an invocation, populated as a part of expression compilation.

Fields§

§root_identifier: String

Identifier of the top-level symbol (stripped of this or self) for nested symbols (foo for foo.bar) or the identifier itself for non-nested symbols (foo for foo)

§escaped_identifier: String

Identifier escaped so that all operations (like . or [...]) are encoded as a valid single identifier

§stack_offset: usize

Statically known stack offset for traversing Repeat-based scopes at runtime

§fully_qualified_properties_struct_type: String

Type of the containing Properties struct, for downcasting from PaxType.

§fully_qualified_iterable_type: String

For symbolic invocations that refer to repeat elements, this is the fully qualified type of each such repeated element

§is_numeric: bool

Flags used for particular corner cases of Repeat codegen

§is_bool: bool§is_string: bool§property_flags: PropertyDefinitionFlags

Flags describing attributes of properties

§nested_symbol_tail_literal: String

Metadata used for nested symbol invocation, like foo.bar.baz Holds an RIL “tail” string for appending to invocation literal bodies, like .bar.get().baz.get() for the nested symbol invocation foo.bar.baz.

§is_nested_numeric: bool

Flag describing whether the nested symbolic invocation, e.g. foo.bar, ultimately resolves to a numeric type (as opposed to is_numeric, which represents the root of a nested type)

Implementations§

source§

impl ExpressionSpecInvocation

source

pub fn is_primitive_string(property_type: &TypeId) -> bool

source

pub fn is_primitive_bool(property_type: &TypeId) -> bool

source

pub fn is_numeric(property_type: &TypeId) -> bool

Trait Implementations§

source§

impl Clone for ExpressionSpecInvocation

source§

fn clone(&self) -> ExpressionSpecInvocation

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<'de> Deserialize<'de> for ExpressionSpecInvocation

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ExpressionSpecInvocation

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> RoundFrom<T> for T

source§

fn round_from(x: T) -> T

Performs the conversion.
source§

impl<T, U> RoundInto<U> for T
where U: RoundFrom<T>,

source§

fn round_into(self) -> U

Performs the conversion.
source§

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

§

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

§

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

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,