pub struct InternedStringInterner;Implementations§
Trait Implementations§
Source§impl Default for InternedStringInterner
impl Default for InternedStringInterner
Source§impl StringInternerTrait for InternedStringInterner
impl StringInternerTrait for InternedStringInterner
Source§type Symbol = IString
type Symbol = IString
Represents the type of the interned string symbol or reference.
For no interning, this could be String itself or Arc.
For
string-interner, this would be its Symbol type.Source§fn intern(&mut self, s: &str) -> Self::Symbol
fn intern(&mut self, s: &str) -> Self::Symbol
Interns a string slice and returns a symbol or reference. Read more
Source§fn resolve(&self, symbol: &Self::Symbol) -> String
fn resolve(&self, symbol: &Self::Symbol) -> String
Resolves/retrieves the original string from its interned representation.
This is crucial for verifying correctness and for some interning patterns,
though not all “no interning” strategies would strictly need it for performance benchmarks. Read more
Auto Trait Implementations§
impl Freeze for InternedStringInterner
impl RefUnwindSafe for InternedStringInterner
impl Send for InternedStringInterner
impl Sync for InternedStringInterner
impl Unpin for InternedStringInterner
impl UnwindSafe for InternedStringInterner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more