API Reference — Elixir v1.16.3

Search documentation of Elixir

# View Source API Reference Elixir v1.16.3

## Modules

Access

Key-based access to data structures.

Agent

Agents are a simple abstraction around state.

Application

A module for working with applications and defining application callbacks.

ArgumentError

An exception raised when an argument to a function is invalid.

ArithmeticError

An exception raised on invalid arithmetic operations.

Atom

Atoms are constants whose values are their own name.

BadArityError

An exception raised when a function is called with the wrong number of arguments.

BadBooleanError

An exception raised when an operator expected a boolean, but received something else.

BadFunctionError
BadMapError

An exception raised when something expected a map, but received something else.

BadStructError
Base

This module provides data encoding and decoding functions according to RFC 4648.

Behaviour deprecated

Mechanism for handling behaviours.

Bitwise

A set of functions that perform calculations on bits.

Calendar

This module defines the responsibilities for working with calendars, dates, times and datetimes in Elixir.

Calendar.ISO

The default calendar implementation, a Gregorian calendar following ISO 8601.

Calendar.TimeZoneDatabase

This module defines a behaviour for providing time zone data.

Calendar.UTCOnlyTimeZoneDatabase

Built-in time zone database that works only in the `Etc/UTC` timezone.

CaseClauseError

An exception raised when a term in a `case/2` expression does not match any of the defined `->` clauses.

Code

Utilities for managing code compilation, code evaluation, and code loading.

Code.Fragment

This module provides conveniences for analyzing fragments of textual code and extract available information whenever possible.

Code.LoadError

An exception raised when a file cannot be loaded.

Collectable

A protocol to traverse data structures.

CompileError

An exception raised when there's an error when compiling code.

CondClauseError

An exception raised when no clauses in a `cond/1` expression evaluate to a truthy value.

Config

A simple keyword-based configuration API.

Config.Provider

Specifies a provider API that loads configuration during boot.

Config.Reader

API for reading config files defined with `Config`.

Date

A Date struct and functions.

Date.Range

Returns an inclusive range between dates.

DateTime

A datetime implementation with a time zone.

Dict deprecated

Generic API for dictionaries.

DynamicSupervisor

A supervisor optimized to only start children dynamically.

Enum

Functions for working with collections (known as enumerables).

Enum.EmptyError

An exception that is raised when something expects a non-empty enumerable but finds an empty one.

Enum.OutOfBoundsError

An exception that is raised when a function expects an enumerable to have a certain size but finds that it is too small.

Enumerable

Enumerable protocol used by `Enum` and `Stream` modules.

ErlangError
Exception

Functions to format throw/catch/exit and exceptions.

File

This module contains functions to manipulate files.

File.CopyError

An exception that is raised when copying a file fails.

File.Error

An exception that is raised when a file operation fails.

File.LinkError

An exception that is raised when linking a file fails.

File.RenameError

An exception that is raised when renaming a file fails.

File.Stat

A struct that holds file information.

File.Stream

Defines a `File.Stream` struct returned by `File.stream!/3`.

Float

Functions for working with floating-point numbers.

Function

A set of functions for working with functions.

FunctionClauseError

An exception raised when a function call doesn't match any defined clause.

GenEvent deprecated

An event manager with event handlers behaviour.

GenServer

A behaviour module for implementing the server of a client-server relation.

HashDict deprecated

Tuple-based HashDict implementation.

HashSet deprecated

Tuple-based HashSet implementation.

IO

Functions handling input/output (IO).

IO.ANSI

Functionality to render ANSI escape sequences.

IO.Stream

Defines an `IO.Stream` struct returned by `IO.stream/2` and `IO.binstream/2`.

IO.StreamError
Inspect

The `Inspect` protocol converts an Elixir data structure into an algebra document.

Inspect.Algebra

A set of functions for creating and manipulating algebra documents.

Inspect.Error

Raised when a struct cannot be inspected.

Inspect.Opts

Defines the options used by the `Inspect` protocol.

Integer

Functions for working with integers.

Kernel

`Kernel` is Elixir's default environment.

Kernel.ParallelCompiler

A module responsible for compiling and requiring files in parallel.

Kernel.SpecialForms

Special forms are the basic building blocks of Elixir, and therefore cannot be overridden by the developer.

Kernel.TypespecError

An exception raised when there's an error in a typespec.

KeyError

An exception raised when a key is not found in a data structure.

Keyword

A keyword list is a list that consists exclusively of two-element tuples.

List

Linked lists hold zero, one, or more elements in the chosen order.

List.Chars

The `List.Chars` protocol is responsible for converting a structure to a charlist (only if applicable).

Macro

Functions for manipulating AST and implementing macros.

Macro.Env

A struct that holds compile time environment information.

Map

Maps are the "go to" key-value data structure in Elixir.

MapSet

Functions that work on sets.

MatchError

An exception raised when a pattern match (`=/2`) fails.

MismatchedDelimiterError

An exception raised when a mismatched delimiter is found when parsing code.

Module

Provides functions to deal with modules during compilation time.

Module.Types.Error
NaiveDateTime

A NaiveDateTime struct (without a time zone) and functions.

Node

Functions related to VM nodes.

OptionParser

Functions for parsing command line arguments.

OptionParser.ParseError

An exception raised when parsing option fails.

PartitionSupervisor

A supervisor that starts multiple partitions of the same child.

Path

This module provides conveniences for manipulating or retrieving file system paths.

Port

Functions for interacting with the external world through ports.

Process

Conveniences for working with processes and the process dictionary.

Protocol

Reference and functions for working with protocols.

Protocol.UndefinedError

An exception raised when a protocol is not implemented for a given value.

Range

Ranges represent a sequence of zero, one or many, ascending or descending integers with a common difference called step.

Record

Module to work with, define, and import records.

Regex

Provides regular expressions for Elixir.

Regex.CompileError

An exception raised when a regular expression could not be compiled.

Registry

A local, decentralized and scalable key-value process storage.

RuntimeError

An exception for a generic runtime error.

Set deprecated

Generic API for sets.

Stream

Functions for creating and composing streams.

String

Strings in Elixir are UTF-8 encoded binaries.

String.Chars

The `String.Chars` protocol is responsible for converting a structure to a binary (only if applicable).

StringIO

Controls an IO device process that wraps a string.

Supervisor

A behaviour module for implementing supervisors.

Supervisor.Spec deprecated

Outdated functions for building child specifications.

SyntaxError

An exception raised when there's a syntax error when parsing code.

System

The `System` module provides functions that interact directly with the VM or the host system.

System.EnvError

An exception raised when a system environment variable is not set.

SystemLimitError

An exception raised when a system limit has been reached.

Task

Conveniences for spawning and awaiting tasks.

Task.Supervisor

A task supervisor.

Time

A Time struct and functions.

TokenMissingError

An exception raised when a token is missing when parsing code.

TryClauseError

An exception raised when a term in a `try/1` expression does not match any of the defined `->` clauses in its `else`.

Tuple

Functions for working with tuples.

URI

Utilities for working with URIs.

URI.Error

An exception raised when an error occurs when a `URI` is invalid.

UndefinedFunctionError

An exception raised when a function is invoked that is not defined.

UnicodeConversionError
Version

Functions for parsing and matching versions against requirements.

Version.InvalidRequirementError

An exception raised when a version requirement is invalid.

Version.InvalidVersionError

An exception raised when a version is invalid.

Version.Requirement

A struct that holds version requirement information.

WithClauseError

An exception raised when a term in a `with/1` expression does not match any of the defined `->` clauses in its `else`.

Next Page → Changelog for Elixir v1.16