pub struct InternStringImplInterner { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Default for InternStringImplInterner
impl Default for InternStringImplInterner
Source§impl StringInternerTrait for InternStringImplInterner
impl StringInternerTrait for InternStringImplInterner
Source§type Symbol = u32
type Symbol = u32
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 InternStringImplInterner
impl RefUnwindSafe for InternStringImplInterner
impl Send for InternStringImplInterner
impl Sync for InternStringImplInterner
impl Unpin for InternStringImplInterner
impl UnwindSafe for InternStringImplInterner
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