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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObjectTypeKind
impl Debug for ObjectTypeKind
Source§impl<'de> Deserialize<'de> for ObjectTypeKind
impl<'de> Deserialize<'de> for ObjectTypeKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ObjectTypeKind
impl Hash for ObjectTypeKind
Source§impl Ord for ObjectTypeKind
impl Ord for ObjectTypeKind
Source§fn cmp(&self, other: &ObjectTypeKind) -> Ordering
fn cmp(&self, other: &ObjectTypeKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ObjectTypeKind
impl PartialEq for ObjectTypeKind
Source§fn eq(&self, other: &ObjectTypeKind) -> bool
fn eq(&self, other: &ObjectTypeKind) -> bool
self and other values to be equal, and is used by ==.