# `Unicode.Property.Behaviour`
[🔗](https://github.com/elixir-unicode/unicode/blob/v2.0.0/lib/unicode/property_behaviour.ex#L1)

Defines the behaviour required of modules that
serve a Unicode property.

A property server maps property values to lists
of codepoint ranges and resolves property value
aliases. Modules implementing this behaviour
include `Unicode.Script`, `Unicode.Block`,
`Unicode.GeneralCategory` and `Unicode.Property`.

# `codepoint_list`

```elixir
@type codepoint_list() :: [codepoint_tuple(), ...]
```

# `codepoint_tuple`

```elixir
@type codepoint_tuple() :: {pos_integer(), pos_integer()}
```

# `property`

```elixir
@type property() :: String.t() | atom() | pos_integer()
```

# `aliases`

```elixir
@callback aliases() :: map()
```

Returns a map of aliases for the property values
served by the implementing module.

# `count`

```elixir
@callback count(property()) :: pos_integer()
```

Returns the number of codepoints that have the given
property value.

# `fetch`

```elixir
@callback fetch(property()) :: {:ok, codepoint_list()} | nil
```

Returns `{:ok, codepoint_list}` for the given property
value or an error indication if the property value is not known.

Property value aliases are resolved.

# `get`

```elixir
@callback get(property()) :: codepoint_list() | nil
```

Returns the list of codepoint ranges for the given
property value or `nil` if the property value is not known.

Property value aliases are resolved.

---

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