# API glossary

Source: https://libtmux.org/en/elixir/latest/reference/glossary/

> Kinds, modifiers and package labels in the Elixir API reference.

## Symbol kinds

Kinds identify declarations in the Elixir API reference.

### module

An Elixir module, a named collection of functions, macros and types defined with defmodule.

Module names are atoms, and a nested name such as LibTmux.Control.Request is one flat module rather than a child of LibTmux.Control.

References: [Elixir modules and functions](https://hexdocs.pm/elixir/modules-and-functions.html).

### interface

An Elixir behaviour, a module that declares callbacks other modules implement.

A module implements a behaviour with the @behaviour attribute and defines each required callback.

References: [Elixir behaviours](https://hexdocs.pm/elixir/typespecs.html#behaviours).

### struct

An Elixir module that defines a struct: a map with a fixed set of keys and optional defaults.

Fields hold values and are never reassigned. Functions on the module return a new struct rather than changing one.

References: [Elixir structs](https://hexdocs.pm/elixir/structs.html).

### function

An Elixir function identified by its module, name and arity.

Functions of one name and different arities are different functions. A name ending in ! raises on failure, and a name ending in ? returns a boolean.

References: [Elixir functions and arity](https://hexdocs.pm/elixir/modules-and-functions.html).

### method

A callback that a behaviour declares and an implementing module defines.

A callback is called through the implementing module, not through the behaviour that declares it.

References: [Elixir behaviour callbacks](https://hexdocs.pm/elixir/typespecs.html#behaviours).

### property

A field of an Elixir struct, read with dot access or pattern matching.

A field has no accessor function; structs are plain maps, so the value is stored as the field holds it.

References: [Elixir structs](https://hexdocs.pm/elixir/structs.html).

### typealias

An Elixir type declared with @type or @opaque, named and given an arity.

Types document values for readers and tools. They are not checked when a function runs.

References: [Elixir user-defined types](https://hexdocs.pm/elixir/typespecs.html#user-defined-types).

### exception

An Elixir struct declared with defexception, which can be raised and rescued.

The struct also carries the fields of the error. A bang function raises it; the plain function returns it in an error tuple.

References: [Elixir exceptions](https://hexdocs.pm/elixir/Kernel.html#defexception/1).

## Modifiers

Modifiers add information about calling, implementing, or accessing a declaration. Their precise effect follows the language and the signature.

### opaque

An Elixir type declared with @opaque, whose structure callers must not depend on.

Other modules should build and inspect the value only through the declaring module’s functions.

References: [Elixir user-defined types](https://hexdocs.pm/elixir/typespecs.html#user-defined-types).

### macro

An Elixir macro, defined with defmacro and expanded at compile time.

A caller must require or import the defining module before using the macro.

References: [Elixir macros](https://hexdocs.pm/elixir/Kernel.html#defmacro/2).

### abstract

A callback of a behaviour, declared without a body.

References: [Elixir behaviour callbacks](https://hexdocs.pm/elixir/typespecs.html#behaviours).

### deprecated

A declaration marked with the @deprecated attribute.

The compiler warns at call sites of a deprecated function. The message names the replacement when the author gave one.

References: [Elixir deprecations](https://hexdocs.pm/elixir/Module.html).

### overload

A function with several @spec clauses, each describing one accepted combination of argument types.

The clauses describe one function. Which clause applies depends on the arguments, not on a separate definition.

References: [Elixir function specifications](https://hexdocs.pm/elixir/typespecs.html#defining-a-specification).

## Package context

Package labels identify where an API is supplied.

### package

The Hex package supplying this API.

A package name and its application name are the same in a Mix dependency, and the module names it defines are independent of both.

References: [Hex packages](https://hex.pm/docs/usage).
