.TH erl_features 3erl "stdlib 5.2.2" "Ericsson AB" "Erlang Module Definition" .SH NAME erl_features \- Feature support. .SH DESCRIPTION .LP This module contains functions for supporting features that can be enabled/disabled in Erlang\&. It should be considered as mostly for internal use, although there are some functions that might be useful when writing tools\&. .SH DATA TYPES .nf \fBfeature()\fR\& = atom() .br .fi .nf \fBrelease()\fR\& = integer() >= 0 .br .fi .nf \fBstatus()\fR\& = experimental | approved | permanent | rejected .br .fi .nf \fBtype()\fR\& = extension | backwards_incompatible_change .br .fi .SH EXPORTS .LP .nf .B all() -> [feature()] .br .fi .br .RS .LP Return a list of all known features\&. This list will include features that have been removed (status \fIrejected\fR\&) and features that are no longer configurable (status \fIpermanent\fR\&)\&. .RE .LP .nf .B configurable() -> [feature()] .br .fi .br .RS .LP Return a list of all configurable features, that is, features with status \fIexperimental\fR\& or \fIapproved\fR\&\&. These are the features that can be enabled or disabled\&. .RE .LP .nf .B info(Feature :: feature()) -> FeatureInfoMap | no_return() .br .fi .br .RS .LP Types: .RS 3 Description = string() .br FeatureInfoMap = .br #{description := Description, .br short := Description, .br type := type(), .br keywords := [atom()], .br status := status(), .br experimental => release(), .br approved => release(), .br permanent => release(), .br rejected => release()} .br .RE .RE .RS .LP Return a map containing information about the given feature\&. .RE .LP .nf .B enabled() -> [feature()] .br .fi .br .RS .LP Return a list of the features that are currently enabled\&. Note that the set of enabled is set during startup and can then not be changed\&. .RE .LP .nf .B used(Module :: module() | file:filename()) -> [feature()] .br .fi .br .RS .LP Return the list of features enabled when compiling the module\&. The module need not be loaded, but is found if it exists in the loadpath\&. If not all features used by the module are enabled in the runtime, loading the module is not allowed\&. .RE