pub enum Ty {
Builtin(BuiltinId),
Object(ClassId),
ScriptRef(ScriptRefId),
Array(Box<Ty>),
Dict(Box<Ty>, Box<Ty>),
Enum(EnumRef),
Signal(Option<SignalSigId>),
Callable,
Void,
Variant,
Unknown,
Error,
}Expand description
A Phase-2 type. Clone not Copy (the Boxes in Array/Dict).
Variants§
Builtin(BuiltinId)
A builtin Variant type (int, float, String, Vector2, …).
Object(ClassId)
An engine class instance, this file’s own class, or an inner class.
ScriptRef(ScriptRefId)
Another script, opaque in Phase 2 (the seam yields Unknown instead).
Array(Box<Ty>)
Array[T]; a bare Array is Array(Box::new(Ty::Variant)).
Dict(Box<Ty>, Box<Ty>)
Dictionary[K, V]; a bare Dictionary is Dict(Variant, Variant).
Enum(EnumRef)
An enum type (an enum value is assignable to int).
Signal(Option<SignalSigId>)
A Signal value.
Callable
A Callable value.
Void
No value (void).
Variant
The gradual top / escape hatch (≈ engine VARIANT ≈ Pyright Any).
Unknown
The Phase-3 cross-file seam marker — distinct from Variant. Never warns, never appears
in hover, never cascades a diagnostic.
Error
An already-reported error; suppresses downstream diagnostics.
Implementations§
Source§impl Ty
impl Ty
Sourcepub fn array_of_variant() -> Self
pub fn array_of_variant() -> Self
A bare Array (Array[Variant]).
Sourcepub fn dict_of_variant() -> Self
pub fn dict_of_variant() -> Self
A bare Dictionary (Dictionary[Variant, Variant]).
Sourcepub fn is_variant(&self) -> bool
pub fn is_variant(&self) -> bool
Whether this is the gradual top Variant.
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Whether this is the cross-file seam marker.
Sourcepub fn is_uninformative(&self) -> bool
pub fn is_uninformative(&self) -> bool
Whether a diagnostic should be suppressed because this type carries no information
(Variant/Unknown/Error) — the receivers on which UNSAFE_* etc. must never fire.
Trait Implementations§
impl Eq for Ty
impl StructuralPartialEq for Ty
Auto Trait Implementations§
impl Freeze for Ty
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnsafeUnpin for Ty
impl UnwindSafe for Ty
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> HashEqLike<&T> for T
impl<T> HashEqLike<&T> for T
Source§impl<T> HashEqLike<Cow<'_, T>> for T
impl<T> HashEqLike<Cow<'_, T>> for T
Source§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.