pub struct Context { /* 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 RwLock 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.
Interneris better, but I want to minimize breakage for now.
Implementations§
Source§impl Context
impl Context
Sourcepub fn with_valid_ids(self, ids: impl IntoIterator<Item = Id>) -> Self
pub fn with_valid_ids(self, ids: impl IntoIterator<Item = Id>) -> Self
Restrict the permissible set of interned IDs.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
impl Freeze for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
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