pub struct ResolvedType {
pub name: String,
pub base: Option<BaseType>,
pub constraint: Option<Constraint>,
pub values: Option<ValueSource>,
pub widget: Option<WidgetDecl>,
}Expand description
A resolved type reference: the written name, its base type (if resolvable), and any closed-domain constraint (from a semantic type definition).
Fields§
§name: StringThe type name as written (a base keyword or a semantic-type name).
base: Option<BaseType>The underlying base type, if resolvable.
constraint: Option<Constraint>A closed-domain constraint, for literal-argument validation.
values: Option<ValueSource>The picker’s value source (Tier 3, #174) — advisory; drives the argument picker + value-label inlay hints, never checked against.
widget: Option<WidgetDecl>The studio-builtin argument widget for this type (argument-widget spec) — advisory; drives the inline affordance + editor, never checked.
Implementations§
Source§impl ResolvedType
impl ResolvedType
Sourcepub fn is_registered(&self) -> bool
pub fn is_registered(&self) -> bool
Whether this type actually resolved against a base keyword or a
registered semantic type — false means name is neither (#1027):
[resolve_type] still builds a ResolvedType for an unregistered
name (so callers keep the written name for display), but base is
None in that case. Consumers that render a type with unconditional
confidence (hover, signature help) must check this first — showing
id: var_id for an unregistered var_id is exactly the #1004
divergence this issue closes.
Trait Implementations§
Source§impl Clone for ResolvedType
impl Clone for ResolvedType
Source§fn clone(&self) -> ResolvedType
fn clone(&self) -> ResolvedType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResolvedType
impl Debug for ResolvedType
impl Eq for ResolvedType
Source§impl PartialEq for ResolvedType
impl PartialEq for ResolvedType
impl StructuralPartialEq for ResolvedType
Auto Trait Implementations§
impl Freeze for ResolvedType
impl RefUnwindSafe for ResolvedType
impl Send for ResolvedType
impl Sync for ResolvedType
impl Unpin for ResolvedType
impl UnsafeUnpin for ResolvedType
impl UnwindSafe for ResolvedType
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
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.