pub struct StringPool { /* private fields */ }Expand description
A thread-safe pool for interning strings.
Reduces memory usage by ensuring only one copy of each unique string exists.
Implementations§
Source§impl StringPool
impl StringPool
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a pool with pre-allocated capacity.
Trait Implementations§
Source§impl Debug for StringPool
impl Debug for StringPool
Source§impl Default for StringPool
impl Default for StringPool
Source§fn default() -> StringPool
fn default() -> StringPool
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for StringPool
impl !RefUnwindSafe for StringPool
impl Send for StringPool
impl Sync for StringPool
impl Unpin for StringPool
impl UnwindSafe for StringPool
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more