Skip to main content

Module types

Module types 

Source

Structs§

Bound
DisplayName
Gives out no &str, so no code can decide a type property by its spelling.
ErrorReported
FunctionParameter
FunctionType
Spelling
SubstitutionMap
Type parameter name -> concrete type.
Symbol
Dot-qualified identifier for a named type, method, value, or variant.
Type
TypeList
TypeScheme
TypeVarId
A unique handle identifying an inference variable in a checker’s type environment.

Enums§

CompoundKind
GoNilForm
True when the Go representation carries nil, so an Option over it encodes None as nil instead of a tag.
IterSeqKind
IterableKind
NumericFamily
RangeKind
ScaledImaginary
SimpleKind
TypeChildren
TypeKind

Constants§

PRELUDE_ERROR_ID
SELF_TYPE_NAME
TEST_CONTEXT_ID

Functions§

as_interface
build_named_substitution_map
build_substitution_map
Build a substitution map from a list of generics and their type arguments, pairing each generic’s name with the type at the same position.
contains_unknown
contains_write_permission
declares_writable_components
Whether a struct or enum declares a component that carries write permission.
go_nil_form
has_byte_or_rune_slice_underlying
is_lisette_enum
is_named_numeric_type
is_nilable_go_type
is_numeric_compatible_with
is_orderable
is_rune
literal_adaptation_target
method_receiver_substitution
newtype_underlying
Return the field type of a newtype occurrence, demoted when the occurrence is read-only.
package_for_qualified_name
Resolve the package of a qualified ID. For go: IDs containing /, does a longest-prefix match against known packages to disambiguate paths whose package segment contains dots (e.g. gopkg.in/yaml.v3). Otherwise splits on the first dot. Returns None when the id has no dot and is not a registered go: package.
parameter_grants_write
Whether a parameter of this type grants the callee write permission over the argument’s storage.
partial_ok_is_nilable
Whether a Go Partial value can be nil, which makes the bare Err reachable.
peel_to_iter_seq
resolve_to_function_type
satisfies_ordered_constraint
True for Go’s cmp.Ordered set: ints, floats, strings, parameters, and named aliases over those types.
scaled_imaginary
substitute
type_args_match_params
underlying_numeric_type
underlying_simple_kind
underlying_type
Follow newtype fields to their canonical representation. The cycle guard also makes this safe for recovery types built from invalid recursive declarations.
unqualified_name
Extract the unqualified name from a dot-qualified identifier.
writable_ref_pointee
The pointee of a mut Ref, which is writable when its type declares writable components.