pex 0.2.4

A nightly parser combinator library for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::third_party::const_hasher::fnv1a_hash_str_64;

/// Interned string
pub struct InternString {
    key: u64,
}

impl InternString {
    pub const fn new_static(string: &'static str) -> Self {
        Self { key: fnv1a_hash_str_64(string) }
    }
    pub fn new_runtime(string: &str) -> Self {
        Self { key: fnv1a_hash_str_64(string) }
    }
}