Future.Reflect
Future.Reflect
Module future.reflect
import future.reflect
| Module | future.reflect |
| Source | future/reflect/module-docs.zirr, future/reflect/stub.zirr |
An early sketch, kept for reference.
This is the reflection surface as it was first sketched, with empty bodies standing in for behaviour that did not exist yet.
It has since been implemented for real: use reflect, which covers everything here and more. The sketch is kept because proposals and their early implementations are a record of their time.
Contents
Data
Attribute
`future/reflect/stub.zirr:9`
data Attribute {
attributeType: AnyAttribute
args: [String: Any]
}
Fields
| Field | Description |
|---|---|
attributeType |
|
args |
Field
`future/reflect/stub.zirr:3`
data Field {
name: String
type: AnyType
attributes: [Attribute]
}
Fields
| Field | Description |
|---|---|
name |
|
type |
|
attributes |
Attributes
Name
`future/reflect/stub.zirr:14`
attr Name {
name: String
}
Fields
| Field | Description |
|---|---|
name |
Functions
attribute
`future/reflect/stub.zirr:22`
fn attribute(field: Field, attributeType: AttributeType) -> Result
fieldsOf
`future/reflect/stub.zirr:20`
fn fieldsOf(typeValue: AnyType) -> [Field]
hasAttribute
`future/reflect/stub.zirr:24`
fn hasAttribute(field: Field, attributeType: AttributeType) -> Bool
typeOf
`future/reflect/stub.zirr:18`
fn typeOf(value: Any) -> AnyType