# `Kreuzberg.CodeStructureItem`
[🔗](https://github.com/kreuzberg-dev/kreuzberg/blob/main/lib/kreuzberg/code_structure_item.ex#L1)

Structural code element (function, class, method, etc.).

## Fields

  * `:kind` - Item kind (e.g. "function", "class", "method")
  * `:name` - Item name
  * `:visibility` - Visibility modifier (e.g. "public", "private")
  * `:span` - Source span
  * `:children` - Nested structure items
  * `:decorators` - Decorators/annotations
  * `:doc_comment` - Associated doc comment
  * `:signature` - Function/method signature
  * `:body_span` - Span of the body block

# `t`

```elixir
@type t() :: %Kreuzberg.CodeStructureItem{
  body_span: Kreuzberg.CodeSpan.t() | nil,
  children: [t()],
  decorators: [String.t()],
  doc_comment: String.t() | nil,
  kind: String.t(),
  name: String.t() | nil,
  signature: String.t() | nil,
  span: Kreuzberg.CodeSpan.t(),
  visibility: String.t() | nil
}
```

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
