> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Struct StructField

Module: `std::meta::type_def`

```rust
pub comptime struct StructField
{ /* private fields */ }
```

A field of a [`TypeDefinition`](/aztec-nr-api/v6.0.0/std/primitive.TypeDefinition.md), returned from [`TypeDefinition::fields`](/aztec-nr-api/v6.0.0/std/primitive.TypeDefinition.md#fields) and [`TypeDefinition::fields_as_written`](/aztec-nr-api/v6.0.0/std/primitive.TypeDefinition.md#fields_as_written).

## Implementations

```rust
impl StructField
```

```rust
pub comptime fn name(self) -> Quoted
```

The field's declared name, as a [`Quoted`](/aztec-nr-api/v6.0.0/std/primitive.Quoted.md) identifier.

```rust
pub comptime fn typ(self) -> Type
```

The field's declared type.

```rust
pub comptime fn visibility(self) -> ItemVisibility
```

The field's declared visibility.
