Structural metadata for an Elixir typespec lowered by RustQ.
RustQ.Spec.type/2 and RustQ.Spec.aliases/1 return this struct. The
:kind field is the primary semantic classification (:f64, :bool,
:tuple, :struct, :enum, :type, and so on). The :ast field carries
the RustQ Rust type AST used for rendering, :rust is its rendered Rust type,
and :meta carries shape-specific metadata such as:
:elementsfor tuple element types:fieldsfor map/struct field types:elixir_namefor local aliases and enum aliases:elixir_module,:elixir_type, and:elixir_argsfor external Elixir remote types such asSkia.Path.t()
Prefer consuming this structure directly at codegen boundaries instead of parsing rendered Rust type strings.
Summary
Functions
Returns the semantic category for a lowered RustQ type.
Returns true when two lowered types are semantically compatible.
Returns true when a value type can satisfy a callable expected argument type.
Returns the concrete value type expected by a callable argument.
Returns true when a type originated from a specific Elixir remote type.
Converts structured RustQ.Syn.Type metadata into a RustQ meta type.
Returns the success/inner type of Result, NifResult, or Option wrappers.
Returns the vector type that can satisfy an IntoIterator<Item = T> expectation.
Returns true when the type AST structurally contains the given lifetime.
Returns true for wrapper types that can propagate with Rust ?.
Returns the referenced inner type for &T or &mut T metadata.
Returns the element type for Vec<T> metadata.
Types
Functions
Returns the semantic category for a lowered RustQ type.
Returns true when two lowered types are semantically compatible.
Returns true when a value type can satisfy a callable expected argument type.
Returns the concrete value type expected by a callable argument.
This peels structural argument adapters such as impl Into<T> and the common
impl Into<Option<(A, B)>> tuple case so propagation inference can compare a
decoder's success type with the value the Rust call actually expects.
Returns true when a type originated from a specific Elixir remote type.
@spec from_syn(RustQ.Syn.type()) :: t()
Converts structured RustQ.Syn.Type metadata into a RustQ meta type.
This is the first bridge from upstream Rust signatures into Rusty-Elixir type
metadata. It preserves structured wrappers such as refs, options, results,
slices, and paths, while falling back to TypeRaw for Syn shapes that do not
yet expose enough structure to rebuild a richer RustQ AST node.
Returns the success/inner type of Result, NifResult, or Option wrappers.
Returns the vector type that can satisfy an IntoIterator<Item = T> expectation.
Returns true when the type AST structurally contains the given lifetime.
Returns true for wrapper types that can propagate with Rust ?.
Returns the referenced inner type for &T or &mut T metadata.
Returns the element type for Vec<T> metadata.