EnumType

Struct EnumType 

Source
pub struct EnumType(/* private fields */);

Implementations§

Source§

impl EnumType

Source

pub fn name(&self) -> QName

Source

pub fn enum_members(&self) -> SharedMap<String, NumberVariant>

Source

pub fn location(&self) -> Option<Location>

Source

pub fn set_location(&self, loc: Option<Location>)

Source

pub fn private_ns(&self) -> Option<Thingy>

Source

pub fn set_private_ns(&self, ns: Option<Thingy>)

Source

pub fn is_abstract(&self) -> bool

Source

pub fn is_final(&self) -> bool

Source

pub fn is_dynamic(&self) -> bool

Source

pub fn is_options_class(&self) -> bool

Source

pub fn is_external(&self) -> bool

Source

pub fn set_is_external(&self, value: bool)

Source

pub fn extends_class(&self, host: &SemanticHost) -> Option<Thingy>

Possibly unresolved.

Source

pub fn properties(&self, host: &SemanticHost) -> NameMap

Source

pub fn prototype(&self, host: &SemanticHost) -> NameMap

Source

pub fn parent(&self) -> Option<Thingy>

Source

pub fn set_parent(&self, p: Option<Thingy>)

Source

pub fn asdoc(&self) -> Option<Rc<AsDoc>>

Source

pub fn set_asdoc(&self, asdoc: Option<Rc<AsDoc>>)

Source

pub fn metadata(&self) -> SharedArray<Rc<Metadata>>

Source

pub fn includes_undefined( &self, host: &SemanticHost, ) -> Result<bool, DeferError>

Source

pub fn includes_null(&self, host: &SemanticHost) -> Result<bool, DeferError>

Source

pub fn to<T: TryFrom<EnumType, Error = SModelError>>( &self, ) -> Result<T, SModelError>

Source

pub fn is<T: TryFrom<EnumType, Error = SModelError>>(&self) -> bool

Methods from Deref<Target = Type>§

Source

pub fn includes_undefined( &self, host: &SemanticHost, ) -> Result<bool, DeferError>

Source

pub fn includes_null(&self, host: &SemanticHost) -> Result<bool, DeferError>

Source

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.

Source

pub fn type_default_value( &self, host: &SemanticHost, ) -> Result<Option<Thingy>, DeferError>

Source

pub fn to<T: TryFrom<Type, Error = SModelError>>( &self, ) -> Result<T, SModelError>

Source

pub fn is<T: TryFrom<Type, Error = SModelError>>(&self) -> bool

Methods from Deref<Target = Thingy>§

Source

pub fn defer(&self) -> Result<Thingy, DeferError>

Source

pub fn location(&self) -> Option<Location>

Source

pub fn set_location(&self, loc: Option<Location>)

Source

pub fn qualifier(&self) -> Option<Thingy>

Source

pub fn key(&self) -> Thingy

Source

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.

Source

pub fn is_dynamic_or_inherits_dynamic( &self, host: &SemanticHost, ) -> Result<bool, DeferError>

Source

pub fn tuple_index(&self) -> usize

Source

pub fn system_ns_kind(&self) -> Option<SystemNamespaceKind>

Source

pub fn asdoc(&self) -> Option<Rc<AsDoc>>

Source

pub fn set_asdoc(&self, asdoc: Option<Rc<AsDoc>>)

Source

pub fn metadata(&self) -> SharedArray<Rc<Metadata>>

Source

pub fn escape_of_nullable(&self) -> Thingy

Escapes out of a nullable type layer.

Source

pub fn escape_of_non_nullable(&self) -> Thingy

Escapes out of a non nullable type layer.

Source

pub fn escape_of_nullable_or_non_nullable(&self) -> Thingy

Escapes out of a nullable or non nullable type layer.

Source

pub fn object(&self) -> Thingy

Source

pub fn uri(&self) -> String

Source

pub fn open_ns_set(&self) -> SharedArray<Thingy>

Source

pub fn import_list(&self) -> SharedArray<Thingy>

Source

pub fn is_class_or_equivalent(&self) -> bool

Source

pub fn local_name(&self) -> String

Source

pub fn class(&self) -> Thingy

Source

pub fn interface(&self) -> Thingy

Source

pub fn package(&self) -> Thingy

Source

pub fn of_method(&self) -> Thingy

Source

pub fn search_activation(&self) -> Option<Thingy>

Source

pub fn this(&self) -> Option<Thingy>

Source

pub fn set_this(&self, this: Option<Thingy>)

Source

pub fn property_has_capture(&self, property: &Thingy) -> bool

Source

pub fn set_property_has_capture(&self, property: &Thingy, value: bool)

Source

pub fn referenced_type(&self) -> Thingy

Source

pub fn referenced_ns(&self) -> Thingy

Source

pub fn parent(&self) -> Option<Thingy>

Source

pub fn set_parent(&self, p: Option<Thingy>)

Source

pub fn package_concats(&self) -> SharedArray<Thingy>

Source

pub fn public_ns(&self) -> Option<Thingy>

Source

pub fn set_public_ns(&self, ns: Option<Thingy>)

Source

pub fn private_ns(&self) -> Option<Thingy>

Source

pub fn set_private_ns(&self, ns: Option<Thingy>)

Source

pub fn protected_ns(&self) -> Option<Thingy>

Source

pub fn set_protected_ns(&self, ns: Option<Thingy>)

Source

pub fn static_protected_ns(&self) -> Option<Thingy>

Source

pub fn set_static_protected_ns(&self, ns: Option<Thingy>)

Source

pub fn internal_ns(&self) -> Option<Thingy>

Source

pub fn set_internal_ns(&self, ns: Option<Thingy>)

Source

pub fn is_public_ns(&self) -> bool

Source

pub fn is_private_ns(&self) -> bool

Source

pub fn is_protected_ns(&self) -> bool

Source

pub fn is_internal_ns(&self) -> bool

Source

pub fn is_static_protected_ns(&self) -> bool

Source

pub fn is_parameterized_type_or_type_after_sub(&self) -> bool

Source

pub fn number_value(&self) -> NumberVariant

Source

pub fn string_value(&self) -> String

Source

pub fn boolean_value(&self) -> bool

Source

pub fn type_default_value( &self, host: &SemanticHost, ) -> Result<Option<Thingy>, DeferError>

Source

pub fn conversion_variant(&self) -> TypeConversionVariant

Source

pub fn conversion_is_opt(&self) -> bool

Source

pub fn conversion_target(&self) -> Thingy

Source

pub fn is_class_type_possibly_after_sub(&self) -> bool

Returns whether a type is a class, whether original or after substitution.

Source

pub fn is_interface_type_possibly_after_sub(&self) -> bool

Returns whether a type is an interface, whether original or after substitution.

Source

pub fn flex_events(&self) -> SharedMap<String, Thingy>

Event mapping from [Event(name="eventName", type="T")] meta-data.

Source

pub fn bindable_event(&self) -> Option<String>

Source

pub fn set_bindable_event(&self, name: Option<String>)

Source

pub fn getter(&self, host: &SemanticHost) -> Option<Thingy>

Source

pub fn set_getter(&self, m: Option<Thingy>)

Source

pub fn setter(&self, host: &SemanticHost) -> Option<Thingy>

Source

pub fn set_setter(&self, m: Option<Thingy>)

Source

pub fn static_type(&self, host: &SemanticHost) -> Thingy

Source

pub fn set_static_type(&self, value: Thingy)

Source

pub fn clone_constant(&self, host: &SemanticHost) -> Thingy

Source

pub fn is_external(&self) -> bool

Source

pub fn set_is_external(&self, value: bool)

Source

pub fn is_abstract(&self) -> bool

Source

pub fn set_is_abstract(&self, value: bool)

Source

pub fn is_final(&self) -> bool

Source

pub fn set_is_final(&self, value: bool)

Source

pub fn is_dynamic(&self) -> bool

Source

pub fn set_is_dynamic(&self, value: bool)

Source

pub fn is_options_class(&self) -> bool

Source

pub fn set_is_options_class(&self, value: bool)

Source

pub fn is_static(&self) -> bool

Source

pub fn set_is_static(&self, value: bool)

Source

pub fn is_overriding(&self) -> bool

Source

pub fn set_is_overriding(&self, value: bool)

Source

pub fn is_async(&self) -> bool

Source

pub fn set_is_async(&self, value: bool)

Source

pub fn is_generator(&self) -> bool

Source

pub fn set_is_generator(&self, value: bool)

Source

pub fn signature(&self, host: &SemanticHost) -> Thingy

Source

pub fn set_signature(&self, signature: &Thingy)

Source

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.

Source

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.

Source

pub fn type_after_sub_has_origin(&self, origin: &Thingy) -> bool

Source

pub fn is_type_or_type_after_sub_has_origin( &self, type_or_origin: &Thingy, ) -> bool

Source

pub fn origin_or_parameterized_type_identity(&self) -> Option<Thingy>

Source

pub fn descending_class_hierarchy<'a>( &self, host: &'a SemanticHost, ) -> DescendingClassHierarchy<'a>

Iterator over a descending class hierarchy.

Source

pub fn descending_scope_hierarchy(&self) -> DescendingScopeHierarchy

Iterator over a descending scope hierarchy.

Source

pub fn descending_definition_hierarchy(&self) -> DescendingDefinitionHierarchy

Iterator over a descending definition hierarchy.

Source

pub fn is_namespace_or_ns_reference(&self) -> bool

Source

pub fn wrap_property_reference( &self, host: &SemanticHost, ) -> Result<Thingy, DeferError>

Source

pub fn activation(&self) -> Option<Thingy>

Source

pub fn set_activation(&self, activation: Option<Thingy>)

Source

pub fn of_virtual_slot(&self, host: &SemanticHost) -> Option<Thingy>

Source

pub fn set_of_virtual_slot(&self, virtual_slot: Option<Thingy>)

Source

pub fn overriden_by(&self, host: &SemanticHost) -> SharedArray<Thingy>

Source

pub fn overrides_method(&self, host: &SemanticHost) -> Option<Thingy>

Source

pub fn set_overrides_method(&self, method: Option<Thingy>)

Source

pub fn is_constructor(&self) -> bool

Source

pub fn set_is_constructor(&self, value: bool)

Source

pub fn constructor_method(&self, host: &SemanticHost) -> Option<Thingy>

Source

pub fn set_constructor_method(&self, m: Option<Thingy>)

Source

pub fn known_subclasses(&self) -> SharedArray<Thingy>

Source

pub fn implements(&self, host: &SemanticHost) -> SharedArray<Thingy>

Includes possibly unresolved.

Source

pub fn extends_class(&self, host: &SemanticHost) -> Option<Thingy>

Possibly unresolved.

Source

pub fn set_extends_class(&self, entity: Option<Thingy>)

Source

pub fn prototype(&self, host: &SemanticHost) -> NameMap

Source

pub fn properties(&self, host: &SemanticHost) -> NameMap

Source

pub fn subpackages(&self) -> SharedMap<String, Thingy>

Source

pub fn alias_of(&self) -> Thingy

Source

pub fn resolve_alias(&self) -> Thingy

Source

pub fn property(&self) -> Thingy

Source

pub fn includes_undefined( &self, host: &SemanticHost, ) -> Result<bool, DeferError>

Source

pub fn includes_null(&self, host: &SemanticHost) -> Result<bool, DeferError>

Source

pub fn name(&self) -> QName

Source

pub fn fully_qualified_name(&self) -> String

Source

pub fn fully_qualified_name_list(&self) -> Vec<String>

Source

pub fn type_params(&self) -> Option<SharedArray<Thingy>>

Source

pub fn set_type_params(&self, list: Option<SharedArray<Thingy>>)

Source

pub fn enum_members(&self) -> SharedMap<String, NumberVariant>

Source

pub fn known_implementors(&self) -> SharedArray<Thingy>

Source

pub fn extends_interfaces(&self, host: &SemanticHost) -> SharedArray<Thingy>

Includes possibly unresolved.

Source

pub fn origin(&self) -> Thingy

Source

pub fn substitute_types(&self) -> SharedArray<Thingy>

Source

pub fn indirect_type_params(&self) -> SharedArray<Thingy>

Source

pub fn indirect_substitute_types(&self) -> SharedArray<Thingy>

Source

pub fn element_types(&self) -> SharedArray<Thingy>

Source

pub fn params(&self) -> SharedArray<Rc<SemanticFunctionTypeParameter>>

Source

pub fn result_type(&self) -> Thingy

Source

pub fn base(&self) -> Thingy

Source

pub fn type_substitution( &self, host: &SemanticHost, type_params: &SharedArray<Thingy>, substitute_types: &SharedArray<Thingy>, ) -> Thingy

Performs type substitution.

Source

pub fn read_only(&self, host: &SemanticHost) -> bool

Source

pub fn set_read_only(&self, value: bool)

Source

pub fn write_only(&self, host: &SemanticHost) -> bool

Source

pub fn set_write_only(&self, value: bool)

Source

pub fn deletable(&self, host: &SemanticHost) -> bool

Source

pub fn var_constant(&self) -> Option<Thingy>

Source

pub fn set_var_constant(&self, k: Option<Thingy>)

Source

pub fn is_ascending_type_of( &self, possibly_subtype: &Thingy, host: &SemanticHost, ) -> Result<bool, DeferError>

Source

pub fn is_subtype_of( &self, possibly_ascending_type: &Thingy, host: &SemanticHost, ) -> Result<bool, DeferError>

Source

pub fn is_equals_or_subtype_of( &self, other: &Thingy, host: &SemanticHost, ) -> Result<bool, DeferError>

Source

pub fn all_ascending_types(&self, host: &SemanticHost) -> Vec<Thingy>

Returns all ascending types of a type in ascending type order, each possibly unresolved.

Source

pub fn direct_ascending_types(&self, host: &SemanticHost) -> Vec<Thingy>

Returns direct ascending types of a type, each possibly unresolved.

Source

pub fn expect_type(&self) -> Result<Thingy, TypeExpectError>

Source

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.

Source

pub fn lookup_in_scope_chain( &self, host: &SemanticHost, qual: Option<Thingy>, key: &PropertyLookupKey, ) -> Result<Option<Thingy>, PropertyLookupError>

Lookups property in the scope chain.

Source

pub fn to<T: TryFrom<Thingy, Error = SModelError>>( &self, ) -> Result<T, SModelError>

Source

pub fn is<T: TryFrom<Thingy, Error = SModelError>>(&self) -> bool

Trait Implementations§

Source§

impl Clone for EnumType

Source§

fn clone(&self) -> EnumType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EnumType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<EnumType> for Thingy

Source§

fn from(v: EnumType) -> Self

Converts to this type from the input type.
Source§

impl From<EnumType> for Type

Source§

fn from(v: EnumType) -> Self

Converts to this type from the input type.
Source§

impl Hash for EnumType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for EnumType

Source§

fn eq(&self, other: &EnumType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<Thingy> for EnumType

Source§

type Error = SModelError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Thingy) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Type> for EnumType

Source§

type Error = SModelError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Type) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Deref for EnumType

Source§

type Target = Type

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Eq for EnumType

Source§

impl StructuralPartialEq for EnumType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
Source§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

Source§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
Source§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, Dst> ConvAsUtil<Dst> for T

Source§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
Source§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
Source§

impl<T> ConvUtil for T

Source§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
Source§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
Source§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
Source§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
Source§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<Src> TryFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

Source§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<Src> ValueFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
Source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

Source§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.