Struct pax_compiler::manifest::TypeDefinition
source · pub struct TypeDefinition {
pub type_id: String,
pub type_id_escaped: String,
pub import_path: String,
pub inner_iterable_type_id: Option<String>,
pub property_definitions: Vec<PropertyDefinition>,
}
Expand description
Describes metadata surrounding a property’s type, gathered from a combination of static & dynamic analysis
Fields§
§type_id: String
Program-unique ID for this type
type_id_escaped: String
Same as fully qualified type, but Pascalized to make a suitable enum identifier
import_path: String
Unlike type_id, contains no generics data. Simply used for qualifying / importing a type, like std::vec::Vec
inner_iterable_type_id: Option<String>
Statically known type_id for this Property’s iterable TypeDefinition, that is,
T for some Property<Vec
property_definitions: Vec<PropertyDefinition>
A vec of PropertyType, describing known addressable (sub-)properties of this PropertyType
Implementations§
source§impl TypeDefinition
impl TypeDefinition
pub fn primitive(type_name: &str) -> Self
sourcepub fn builtin_vec_rc_properties_coproduct(
inner_iterable_type_id: String
) -> Self
pub fn builtin_vec_rc_properties_coproduct( inner_iterable_type_id: String ) -> Self
Used by Repeat for source expressions, e.g. the self.some_vec
in for elem in self.some_vec
pub fn builtin_range_isize() -> Self
pub fn builtin_rc_properties_coproduct() -> Self
Trait Implementations§
source§impl Clone for TypeDefinition
impl Clone for TypeDefinition
source§fn clone(&self) -> TypeDefinition
fn clone(&self) -> TypeDefinition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TypeDefinition
impl Debug for TypeDefinition
source§impl Default for TypeDefinition
impl Default for TypeDefinition
source§fn default() -> TypeDefinition
fn default() -> TypeDefinition
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TypeDefinition
impl<'de> Deserialize<'de> for TypeDefinition
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for TypeDefinition
impl Send for TypeDefinition
impl Sync for TypeDefinition
impl Unpin for TypeDefinition
impl UnwindSafe for TypeDefinition
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