ry-interner

Crates.iory-interner
lib.rsry-interner
version0.1.1
sourcesrc
created_at2023-04-02 16:16:26.007078
updated_at2023-04-03 17:49:21.102846
descriptionEasy to use string interner with fast access to underlying strings and minimal memory footprint.
homepage
repositoryhttps://github.com/abs0luty/ry-interner
max_upload_size
id828212
size12,159
Adi Salimgereyev (abs0luty)

documentation

https://docs.rs/ry-interner

README

ry_interner crate.

Extracted 327 lines of Rust code that implement string internering for Ry programming language compiler.

Example

fn main() {
    let interner = Interner::default();
    let s1 = interner.get_or_intern("test");
    let s2 = interner.get_or_intern("test");
    assert_eq!(s1, s2);

    assert_eq!(interner.resolve(0).unwrap(), "test");
}
Commit count: 16

cargo fmt