Module string

Source
Expand description

This module implements Nix language strings.

See NixString for more information about the internals of string values

Re-exportsΒ§

pub use context::NixContext;
pub use context::NixContextElement;

ModulesΒ§

arbitrary πŸ”’
context πŸ”’

StructsΒ§

Interner πŸ”’
InternerInner πŸ”’
NixString
Nix string values
NixStringInner πŸ”’
This type is never instantiated, but serves to document the memory layout of the actual heap allocation for Nix strings.

ConstantsΒ§

INTERNER πŸ”’
INTERN_THRESHOLD πŸ”’
Set non-scientifically. TODO(aspen): think more about what this should be

FunctionsΒ§

hash πŸ”’
is_keyword πŸ”’
Return true if this string is a keyword – character strings which lexically match the β€œidentifier” production but are not parsed as identifiers. See also cppnix commit b72bc4a972fe568744d98b89d63adcd504cb586c.
is_valid_nix_identifier πŸ”’
Return true if this string can be used as an identifier in Nix.
nix_escape_char πŸ”’
nix_escape_string πŸ”’
Escape a Nix string for display, as most user-visible representation are escaped strings.