pub struct StringPool { /* private fields */ }Expand description
A string interning table for efficient repeated string serialization.
Implementations§
Source§impl StringPool
impl StringPool
Sourcepub fn write(&self, w: &mut OleanWriter)
pub fn write(&self, w: &mut OleanWriter)
Serialize the pool.
Sourcepub fn read(r: &mut OleanReader<'_>) -> Result<Self, OleanError>
pub fn read(r: &mut OleanReader<'_>) -> Result<Self, OleanError>
Deserialize a pool.
Sourcepub fn all_strings(&self) -> &[String]
pub fn all_strings(&self) -> &[String]
Return all strings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StringPool
impl RefUnwindSafe for StringPool
impl Send for StringPool
impl Sync for StringPool
impl Unpin for StringPool
impl UnsafeUnpin 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