pub enum ObjectTypeKind {
AnyObject,
TypedObject {
properties: Vec<ObjectProperty>,
},
NamedObject {
name: StringIdentifier,
type_parameters: Vec<TypeKind>,
},
AnonymousObject {
span: Span,
},
EnumCase {
enum_name: StringIdentifier,
case_name: StringIdentifier,
},
Generator {
key: Box<TypeKind>,
value: Box<TypeKind>,
send: Box<TypeKind>,
return: Box<TypeKind>,
},
Static {
scope: StringIdentifier,
},
Parent {
scope: StringIdentifier,
},
Self_ {
scope: StringIdentifier,
},
}Expand description
Represents object types, including specific instances and generic types.
Variants§
AnyObject
Represents any object (object type), without specifying any properties or class.
TypedObject
A typed object with specified properties.
For example, object{ foo: string, bar: int } defines an object with properties foo and bar.
Fields
properties: Vec<ObjectProperty>The properties of the object.
NamedObject
A named object with generic type parameters.
For example, Foo<T, U> represents an instance of class Foo with type parameters T and U.
Fields
name: StringIdentifierThe name of the class.
AnonymousObject
An instance of an anonymous class.
EnumCase
An enum case, representing a specific case of an enum.
Fields
enum_name: StringIdentifierThe name of the enum.
case_name: StringIdentifierThe case of the enum.
Generator
A generator type with specified key, value, send, and return types.
For example, Generator<T, U, V, W>.
Static
The static type, representing the class of the called context.
Fields
scope: StringIdentifierThe scope of the static type.
Parent
The parent type, representing the parent class in the class hierarchy.
Fields
scope: StringIdentifierThe scope of the parent type.
Self_
The self type, representing the current class.
Fields
scope: StringIdentifierThe scope of the self type.
Trait Implementations§
Source§impl Clone for ObjectTypeKind
impl Clone for ObjectTypeKind
Source§fn clone(&self) -> ObjectTypeKind
fn clone(&self) -> ObjectTypeKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more