RustQ.Rust.Identifier (rustq v0.11.1)

Copy Markdown View Source

Safe conversion of finite generator names into Rust identifier atoms.

RustQ AST node names are represented as atoms for native decoding. Use atom!/1 when a generator derives a Rust identifier from bounded structural metadata rather than calling String.to_atom/1 directly.

Summary

Functions

Returns a Rust identifier atom, rejecting invalid or oversized names.

Returns whether a string is a plain Rust identifier accepted by atom!/1.

Functions

atom!(value)

@spec atom!(atom() | String.t()) :: atom()

Returns a Rust identifier atom, rejecting invalid or oversized names.

valid?(arg1)

@spec valid?(String.t()) :: boolean()

Returns whether a string is a plain Rust identifier accepted by atom!/1.