pub struct StringPool {
small_strings: VecDeque<String>,
large_strings: VecDeque<String>,
max_size: usize,
}Expand description
字符串池,重用字符串对象
Fields§
§small_strings: VecDeque<String>小字符串池 (<=64字符)
large_strings: VecDeque<String>大字符串池 (>64字符)
max_size: usize最大池大小
Implementations§
Source§impl StringPool
impl StringPool
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§
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