檢視原始碼 erl_features (stdlib v6.2)

此模組包含支援 Erlang 中可啟用/停用功能的函式。

它主要應被視為內部使用,儘管有些函式在編寫工具時可能很有用。

概要

函式

返回所有已知功能的列表。此列表將包含已移除(狀態為 rejected)和不再可配置(狀態為 permanent)的功能。

返回所有可配置功能的列表,也就是狀態為 experimentalapproved 的功能。這些是可以啟用或停用的功能。

返回目前已啟用的功能列表。請注意,啟用的功能集是在啟動期間設定的,之後無法更改。

返回一個包含給定功能相關資訊的映射。

返回編譯模組時啟用的功能列表。該模組不一定要載入,但如果它存在於載入路徑中就會被找到。如果模組使用的所有功能在執行時未啟用,則不允許載入該模組。

型別

連結到此型別

feature()

檢視原始碼 (未匯出) (自 OTP 25.0 起)
-type feature() :: atom().
連結到此型別

release()

檢視原始碼 (未匯出) (自 OTP 25.0 起)
-type release() :: non_neg_integer().
連結到此型別

status()

檢視原始碼 (未匯出) (自 OTP 25.0 起)
-type status() :: experimental | approved | permanent | rejected.
連結到此型別

type()

檢視原始碼 (未匯出) (自 OTP 25.0 起)
-type type() :: extension | backwards_incompatible_change.

函式

連結到此函式

all()

檢視原始碼 (自 OTP 25.0 起)
-spec all() -> [feature()].

返回所有已知功能的列表。此列表將包含已移除(狀態為 rejected)和不再可配置(狀態為 permanent)的功能。

連結到此函式

configurable()

檢視原始碼 (自 OTP 25.1 起)
-spec configurable() -> [feature()].

返回所有可配置功能的列表,也就是狀態為 experimentalapproved 的功能。這些是可以啟用或停用的功能。

連結到此函式

enabled()

檢視原始碼 (自 OTP 25.0 起)
-spec enabled() -> [feature()].

返回目前已啟用的功能列表。請注意,啟用的功能集是在啟動期間設定的,之後無法更改。

連結到此函式

info(Feature)

檢視原始碼 (自 OTP 25.0 起)
-spec info(feature()) -> FeatureInfoMap | no_return()
              when
                  Description :: string(),
                  FeatureInfoMap ::
                      #{description := Description,
                        short := Description,
                        type := type(),
                        keywords := [atom()],
                        status := status(),
                        experimental => release(),
                        approved => release(),
                        permanent => release(),
                        rejected => release()}.

返回一個包含給定功能相關資訊的映射。

連結到此函式

used/1

檢視原始碼 (自 OTP 25.0 起)
-spec used(module() | file:filename()) -> [feature()].

返回編譯模組時啟用的功能列表。該模組不一定要載入,但如果它存在於載入路徑中就會被找到。如果模組使用的所有功能在執行時未啟用,則不允許載入該模組。