# `ASDF.Handle`
[🔗](https://github.com/baoulo/asdf-elixir/blob/v0.1.0/lib/asdf/handle.ex#L1)

An open ASDF source.

The struct holds the pid of the process that keeps the file descriptor
and the parsed tree. `ASDF.close/1` closes the descriptor and stops that
process. Further calls return `{:error, %ASDF.Error{reason: :closed}}`.

## Examples

    iex> bytes = ASDF.write!(:binary, %{"n" => 1})
    ...> handle = ASDF.open!({:binary, bytes})
    ...> alive = is_pid(handle.pid) and Process.alive?(handle.pid)
    ...> ASDF.close(handle)
    ...> {alive, Process.alive?(handle.pid)}
    {true, false}

# `t`

```elixir
@type t() :: %ASDF.Handle{pid: pid()}
```

One open file.

  * `:pid` — process that holds the descriptor and the parsed tree

---

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