Core Library0.xAPI reference

Choose documentation 1

pr-173

Current version

pr-173
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

Elixir API

API glossary

On this page

Kinds, modifiers and package labels in the Elixir API reference. Select an annotation or full API badge to open its definition here.

The signature and entry documentation describe the API’s behavior, including its calling conventions, storage and runtime checks.

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 .

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 .

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 .

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 .

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 .

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 .

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 .

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 .

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 .

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 .

abstract

A callback of a behaviour, declared without a body.

References: Elixir behaviour callbacks .

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 @deprecated attribute .

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 .

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 .

Glossary JSON

Esc
Search in

Type to search.

Reference previewOpen reference