# `Minga.Buffer.Conflict`
[🔗](https://github.com/jsmestad/minga/blob/main/sdk/lib/declarations/minga/buffer/conflict.ex#L1)

Stable values for reading and resolving buffer merge conflicts.

# `choice`

```elixir
@type choice() :: :current | :incoming | :both
```

Keep the current side, incoming side, or both in that order.

# `region`

```elixir
@type region() :: %{start_line: non_neg_integer(), end_line: non_neg_integer()}
```

The inclusive, zero-based marker lines of a conflict at one buffer version.

# `rejection`

```elixir
@type rejection() :: :stale | :not_found | :read_only
```

Rejected resolutions leave the buffer unchanged.

# `resolution`

```elixir
@type resolution() :: %{version: non_neg_integer(), remaining: non_neg_integer()}
```

The mutation version produced by a resolution and the number of conflicts left.

# `target`

```elixir
@type target() :: {:cursor, non_neg_integer()} | {:region, region()}
```

Resolve the conflict at an observed cursor line or an exact observed region.

# `view`

```elixir
@type view() :: %{
  version: non_neg_integer(),
  cursor: Minga.Buffer.position(),
  entries: [region()]
}
```

Conflict coordinates in document order, cursor, and mutation version from one read.

---

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