Module util

Source
Expand description

Utility functions.

Enums§

GcVoid
A version of void::Void that is GC-able.

Functions§

as_list
Converts a Value to a Vec<Value>. Will only convert cons-lists, not vectors.
as_list_meta
Converts a Value to a Vec<(Value, ValueMeta)>. Will only convert cons-lists, not vectors.
as_shl
Converts the given Value to a symbol and rest values.
as_sym_list
Converts a Value to a Vec<Symbol>. Will only convert cons-lists, not vectors.
from_assoc
Converts a list of symbol-value pairs to a hashmap.
from_list_meta
Converts a Vec<(Value, ValueMeta)> to a cons-list.
is_internal
Returns whether the given import path is for a module that is “internal,” that is, a module that will not automatically import std/prelude.
is_shl
Returns whether the given Value is a cons-list whose head is the given symbol.
to_assoc
Converts a HashMap<Symbol, Value> (or a compatible IntoIterator) to an assoc.