[−]Struct astral::string::StringId
An opaque struct for fast comparison between strings.
StringId
represents a unique identifier to a string.
Example
use astral::string::StringId; let id1 = StringId::new("foo", &string_subsystem); let id2 = StringId::new("bar", &string_subsystem); let id3 = StringId::new("foo", &string_subsystem); assert_ne!(id1, id2); assert_eq!(id1, id3);
Methods
impl StringId
pub fn new<S>(
string: S,
subsystem: &Subsystem<BuildHasherDefault<Murmur3>>
) -> StringId where
S: AsRef<str>,
string: S,
subsystem: &Subsystem<BuildHasherDefault<Murmur3>>
) -> StringId where
S: AsRef<str>,
Trait Implementations
impl Copy for StringId
impl Eq for StringId
impl PartialEq<StringId> for StringId
impl Debug for StringId
impl Hash for StringId
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for StringId
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
T: Send + Sync + UnwindSafe + ?Sized,