Crate valid_rust_char

Source
Expand description

A tiny crate that exports a table with all ranges of unicode scalar values of invalid characters for a Rust file.

Structs§

InvalidRustChars
Iterator created with the function all_invalid_rust_char.
ValidRustChars
Iterator created with the function all_valid_rust_char.

Constants§

RUST_INVALID_TABLE
A table with all ranges of unicode scalar values of characters that are not valid in Rust.

Functions§

all_invalid_rust_char
Creates an iterator that iterates thought all rust invalid characters,is_invalid_rust_char should be preferred for search if one is there as otherwise the performance will decrease a lot.
all_valid_rust_char
Creates an iterator that iterates thought all rust valid characters,is_valid_rust_char should be preferred for search if one is there as otherwise the performance will decrease a lot.
is_invalid_rust_char
Checks whether a character it’s an invalid one for a Rust file by binary searching RUST_INVALID_TABLE.
is_valid_rust_char
Checks whether a character it’s a valid one for a Rust file,convenience to !is_invalid_rust_char(c).