pub struct Context<T> { /* private fields */ }Expand description
A Context holds a set of interned IDs for use during serialization/deserialization, mapping
IDs to u16 indices.
§Upcoming Changes
- This object holds an Arc of Mutex internally because we need concurrent access from the layout writer code path. We should update SegmentSink to take an Array rather than ByteBuffer such that serializing arrays is done sequentially.
- The name is terrible.
Interner<T>is better, but I want to minimize breakage for now.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Context<T>
impl<T> !RefUnwindSafe for Context<T>
impl<T> Send for Context<T>
impl<T> Sync for Context<T>
impl<T> Unpin for Context<T>
impl<T> UnsafeUnpin for Context<T>
impl<T> !UnwindSafe for Context<T>
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