Future.Reflect

The reflect module provides proposal-era reflection stubs for fields,
attributes, and types.

Attributes

attr Name

attr Name {
  name: String
}

No documentation.

Fields:

  • name: String

Data

data Field

data Field {
  name: String
  type: AnyType
  attributes: [Attribute]
}

No documentation.

Fields:

  • name: String
  • type: AnyType
  • attributes: [Attribute]

data Attribute

data Attribute {
  attributeType: AnyAttribute
  args: Array
}

No documentation.

Fields:

  • attributeType: AnyAttribute
  • args: Array

Functions

fn typeOf

fn typeOf(value: Any) -> AnyType

No documentation.

fn fieldsOf

fn fieldsOf(typeValue: AnyType) -> [Field]

No documentation.

fn attribute

fn attribute(field: Field, attributeType: AttributeType) -> Result

No documentation.

fn hasAttribute

fn hasAttribute(field: Field, attributeType: AttributeType) -> Bool

No documentation.