pub struct Scope(/* private fields */);Implementations§
Source§impl Scope
impl Scope
pub fn parent(&self) -> Option<Thingy>
pub fn set_parent(&self, p: Option<Thingy>)
pub fn properties(&self, host: &SemanticHost) -> NameMap
pub fn open_ns_set(&self) -> SharedArray<Thingy>
Sourcepub fn import_list(&self) -> SharedArray<Thingy>
pub fn import_list(&self) -> SharedArray<Thingy>
List of PackagePropertyImport, PackageWildcardImport, or PackageRecursiveImport.
pub fn to<T: TryFrom<Scope, Error = SModelError>>( &self, ) -> Result<T, SModelError>
pub fn is<T: TryFrom<Scope, Error = SModelError>>(&self) -> bool
Methods from Deref<Target = Thingy>§
pub fn defer(&self) -> Result<Thingy, DeferError>
pub fn location(&self) -> Option<Location>
pub fn set_location(&self, loc: Option<Location>)
pub fn qualifier(&self) -> Option<Thingy>
pub fn key(&self) -> Thingy
Sourcepub fn property_static_type(&self, host: &SemanticHost) -> Thingy
pub fn property_static_type(&self, host: &SemanticHost) -> Thingy
Returns the static type of a property, whether for a type, variable, virtual or method slot or namespace,
or act as identity of a value’s static type.
Possibly UnresolvedThingy.
pub fn is_dynamic_or_inherits_dynamic( &self, host: &SemanticHost, ) -> Result<bool, DeferError>
pub fn tuple_index(&self) -> usize
pub fn system_ns_kind(&self) -> Option<SystemNamespaceKind>
pub fn asdoc(&self) -> Option<Rc<AsDoc>>
pub fn set_asdoc(&self, asdoc: Option<Rc<AsDoc>>)
pub fn metadata(&self) -> SharedArray<Rc<Metadata>>
Sourcepub fn escape_of_nullable(&self) -> Thingy
pub fn escape_of_nullable(&self) -> Thingy
Escapes out of a nullable type layer.
Sourcepub fn escape_of_non_nullable(&self) -> Thingy
pub fn escape_of_non_nullable(&self) -> Thingy
Escapes out of a non nullable type layer.
Sourcepub fn escape_of_nullable_or_non_nullable(&self) -> Thingy
pub fn escape_of_nullable_or_non_nullable(&self) -> Thingy
Escapes out of a nullable or non nullable type layer.
pub fn object(&self) -> Thingy
pub fn uri(&self) -> String
pub fn open_ns_set(&self) -> SharedArray<Thingy>
pub fn import_list(&self) -> SharedArray<Thingy>
pub fn is_class_or_equivalent(&self) -> bool
pub fn local_name(&self) -> String
pub fn class(&self) -> Thingy
pub fn interface(&self) -> Thingy
pub fn package(&self) -> Thingy
pub fn of_method(&self) -> Thingy
pub fn search_activation(&self) -> Option<Thingy>
pub fn this(&self) -> Option<Thingy>
pub fn set_this(&self, this: Option<Thingy>)
pub fn property_has_capture(&self, property: &Thingy) -> bool
pub fn set_property_has_capture(&self, property: &Thingy, value: bool)
pub fn referenced_type(&self) -> Thingy
pub fn referenced_ns(&self) -> Thingy
pub fn parent(&self) -> Option<Thingy>
pub fn set_parent(&self, p: Option<Thingy>)
pub fn package_concats(&self) -> SharedArray<Thingy>
pub fn public_ns(&self) -> Option<Thingy>
pub fn set_public_ns(&self, ns: Option<Thingy>)
pub fn private_ns(&self) -> Option<Thingy>
pub fn set_private_ns(&self, ns: Option<Thingy>)
pub fn protected_ns(&self) -> Option<Thingy>
pub fn set_protected_ns(&self, ns: Option<Thingy>)
pub fn static_protected_ns(&self) -> Option<Thingy>
pub fn set_static_protected_ns(&self, ns: Option<Thingy>)
pub fn internal_ns(&self) -> Option<Thingy>
pub fn set_internal_ns(&self, ns: Option<Thingy>)
pub fn is_public_ns(&self) -> bool
pub fn is_private_ns(&self) -> bool
pub fn is_protected_ns(&self) -> bool
pub fn is_internal_ns(&self) -> bool
pub fn is_static_protected_ns(&self) -> bool
pub fn is_parameterized_type_or_type_after_sub(&self) -> bool
pub fn number_value(&self) -> NumberVariant
pub fn string_value(&self) -> String
pub fn boolean_value(&self) -> bool
pub fn type_default_value( &self, host: &SemanticHost, ) -> Result<Option<Thingy>, DeferError>
pub fn conversion_variant(&self) -> TypeConversionVariant
pub fn conversion_is_opt(&self) -> bool
pub fn conversion_target(&self) -> Thingy
Sourcepub fn is_class_type_possibly_after_sub(&self) -> bool
pub fn is_class_type_possibly_after_sub(&self) -> bool
Returns whether a type is a class, whether original or after substitution.
Sourcepub fn is_interface_type_possibly_after_sub(&self) -> bool
pub fn is_interface_type_possibly_after_sub(&self) -> bool
Returns whether a type is an interface, whether original or after substitution.
Sourcepub fn flex_events(&self) -> SharedMap<String, Thingy>
pub fn flex_events(&self) -> SharedMap<String, Thingy>
Event mapping from [Event(name="eventName", type="T")] meta-data.
pub fn bindable_event(&self) -> Option<String>
pub fn set_bindable_event(&self, name: Option<String>)
pub fn getter(&self, host: &SemanticHost) -> Option<Thingy>
pub fn set_getter(&self, m: Option<Thingy>)
pub fn setter(&self, host: &SemanticHost) -> Option<Thingy>
pub fn set_setter(&self, m: Option<Thingy>)
pub fn static_type(&self, host: &SemanticHost) -> Thingy
pub fn set_static_type(&self, value: Thingy)
pub fn clone_constant(&self, host: &SemanticHost) -> Thingy
pub fn is_external(&self) -> bool
pub fn set_is_external(&self, value: bool)
pub fn is_abstract(&self) -> bool
pub fn set_is_abstract(&self, value: bool)
pub fn is_final(&self) -> bool
pub fn set_is_final(&self, value: bool)
pub fn is_dynamic(&self) -> bool
pub fn set_is_dynamic(&self, value: bool)
pub fn is_options_class(&self) -> bool
pub fn set_is_options_class(&self, value: bool)
pub fn is_static(&self) -> bool
pub fn set_is_static(&self, value: bool)
pub fn is_overriding(&self) -> bool
pub fn set_is_overriding(&self, value: bool)
pub fn is_async(&self) -> bool
pub fn set_is_async(&self, value: bool)
pub fn is_generator(&self) -> bool
pub fn set_is_generator(&self, value: bool)
pub fn signature(&self, host: &SemanticHost) -> Thingy
pub fn set_signature(&self, signature: &Thingy)
Sourcepub fn array_element_type(
&self,
host: &SemanticHost,
) -> Result<Option<Thingy>, DeferError>
pub fn array_element_type( &self, host: &SemanticHost, ) -> Result<Option<Thingy>, DeferError>
If a type is [T], returns T, either as an origin type parameter
or as a substitute type.
Sourcepub fn vector_element_type(
&self,
host: &SemanticHost,
) -> Result<Option<Thingy>, DeferError>
pub fn vector_element_type( &self, host: &SemanticHost, ) -> Result<Option<Thingy>, DeferError>
If a type is Vector.<T>, returns T, either as an origin type parameter
or as a substitute type.
pub fn type_after_sub_has_origin(&self, origin: &Thingy) -> bool
pub fn is_type_or_type_after_sub_has_origin( &self, type_or_origin: &Thingy, ) -> bool
pub fn origin_or_parameterized_type_identity(&self) -> Option<Thingy>
Sourcepub fn descending_class_hierarchy<'a>(
&self,
host: &'a SemanticHost,
) -> DescendingClassHierarchy<'a> ⓘ
pub fn descending_class_hierarchy<'a>( &self, host: &'a SemanticHost, ) -> DescendingClassHierarchy<'a> ⓘ
Iterator over a descending class hierarchy.
Sourcepub fn descending_scope_hierarchy(&self) -> DescendingScopeHierarchy ⓘ
pub fn descending_scope_hierarchy(&self) -> DescendingScopeHierarchy ⓘ
Iterator over a descending scope hierarchy.
Sourcepub fn descending_definition_hierarchy(&self) -> DescendingDefinitionHierarchy ⓘ
pub fn descending_definition_hierarchy(&self) -> DescendingDefinitionHierarchy ⓘ
Iterator over a descending definition hierarchy.
pub fn is_namespace_or_ns_reference(&self) -> bool
pub fn wrap_property_reference( &self, host: &SemanticHost, ) -> Result<Thingy, DeferError>
pub fn activation(&self) -> Option<Thingy>
pub fn set_activation(&self, activation: Option<Thingy>)
pub fn of_virtual_slot(&self, host: &SemanticHost) -> Option<Thingy>
pub fn set_of_virtual_slot(&self, virtual_slot: Option<Thingy>)
pub fn overriden_by(&self, host: &SemanticHost) -> SharedArray<Thingy>
pub fn overrides_method(&self, host: &SemanticHost) -> Option<Thingy>
pub fn set_overrides_method(&self, method: Option<Thingy>)
pub fn is_constructor(&self) -> bool
pub fn set_is_constructor(&self, value: bool)
pub fn constructor_method(&self, host: &SemanticHost) -> Option<Thingy>
pub fn set_constructor_method(&self, m: Option<Thingy>)
pub fn known_subclasses(&self) -> SharedArray<Thingy>
Sourcepub fn implements(&self, host: &SemanticHost) -> SharedArray<Thingy>
pub fn implements(&self, host: &SemanticHost) -> SharedArray<Thingy>
Includes possibly unresolved.
Sourcepub fn extends_class(&self, host: &SemanticHost) -> Option<Thingy>
pub fn extends_class(&self, host: &SemanticHost) -> Option<Thingy>
Possibly unresolved.
pub fn set_extends_class(&self, entity: Option<Thingy>)
pub fn prototype(&self, host: &SemanticHost) -> NameMap
pub fn properties(&self, host: &SemanticHost) -> NameMap
pub fn subpackages(&self) -> SharedMap<String, Thingy>
pub fn alias_of(&self) -> Thingy
pub fn resolve_alias(&self) -> Thingy
pub fn property(&self) -> Thingy
pub fn includes_undefined( &self, host: &SemanticHost, ) -> Result<bool, DeferError>
pub fn includes_null(&self, host: &SemanticHost) -> Result<bool, DeferError>
pub fn name(&self) -> QName
pub fn fully_qualified_name(&self) -> String
pub fn fully_qualified_name_list(&self) -> Vec<String>
pub fn type_params(&self) -> Option<SharedArray<Thingy>>
pub fn set_type_params(&self, list: Option<SharedArray<Thingy>>)
pub fn enum_members(&self) -> SharedMap<String, NumberVariant>
pub fn known_implementors(&self) -> SharedArray<Thingy>
Sourcepub fn extends_interfaces(&self, host: &SemanticHost) -> SharedArray<Thingy>
pub fn extends_interfaces(&self, host: &SemanticHost) -> SharedArray<Thingy>
Includes possibly unresolved.
pub fn origin(&self) -> Thingy
pub fn substitute_types(&self) -> SharedArray<Thingy>
pub fn indirect_type_params(&self) -> SharedArray<Thingy>
pub fn indirect_substitute_types(&self) -> SharedArray<Thingy>
pub fn element_types(&self) -> SharedArray<Thingy>
pub fn params(&self) -> SharedArray<Rc<SemanticFunctionTypeParameter>>
pub fn result_type(&self) -> Thingy
pub fn base(&self) -> Thingy
Sourcepub fn type_substitution(
&self,
host: &SemanticHost,
type_params: &SharedArray<Thingy>,
substitute_types: &SharedArray<Thingy>,
) -> Thingy
pub fn type_substitution( &self, host: &SemanticHost, type_params: &SharedArray<Thingy>, substitute_types: &SharedArray<Thingy>, ) -> Thingy
Performs type substitution.
pub fn read_only(&self, host: &SemanticHost) -> bool
pub fn set_read_only(&self, value: bool)
pub fn write_only(&self, host: &SemanticHost) -> bool
pub fn set_write_only(&self, value: bool)
pub fn deletable(&self, host: &SemanticHost) -> bool
pub fn var_constant(&self) -> Option<Thingy>
pub fn set_var_constant(&self, k: Option<Thingy>)
pub fn is_ascending_type_of( &self, possibly_subtype: &Thingy, host: &SemanticHost, ) -> Result<bool, DeferError>
pub fn is_subtype_of( &self, possibly_ascending_type: &Thingy, host: &SemanticHost, ) -> Result<bool, DeferError>
pub fn is_equals_or_subtype_of( &self, other: &Thingy, host: &SemanticHost, ) -> Result<bool, DeferError>
Sourcepub fn all_ascending_types(&self, host: &SemanticHost) -> Vec<Thingy>
pub fn all_ascending_types(&self, host: &SemanticHost) -> Vec<Thingy>
Returns all ascending types of a type in ascending type order, each possibly unresolved.
Sourcepub fn direct_ascending_types(&self, host: &SemanticHost) -> Vec<Thingy>
pub fn direct_ascending_types(&self, host: &SemanticHost) -> Vec<Thingy>
Returns direct ascending types of a type, each possibly unresolved.
pub fn expect_type(&self) -> Result<Thingy, TypeExpectError>
Sourcepub fn lookup_in_object(
&self,
host: &SemanticHost,
open_ns_set: &SharedArray<Thingy>,
qual: Option<Thingy>,
key: &PropertyLookupKey,
) -> Result<Option<Thingy>, PropertyLookupError>
pub fn lookup_in_object( &self, host: &SemanticHost, open_ns_set: &SharedArray<Thingy>, qual: Option<Thingy>, key: &PropertyLookupKey, ) -> Result<Option<Thingy>, PropertyLookupError>
Lookups property in an object.
Sourcepub fn lookup_in_scope_chain(
&self,
host: &SemanticHost,
qual: Option<Thingy>,
key: &PropertyLookupKey,
) -> Result<Option<Thingy>, PropertyLookupError>
pub fn lookup_in_scope_chain( &self, host: &SemanticHost, qual: Option<Thingy>, key: &PropertyLookupKey, ) -> Result<Option<Thingy>, PropertyLookupError>
Lookups property in the scope chain.