pub struct IpcWriteContext {
pub(crate) scratch: Vec<u8>,
fbb: FlatBufferBuilder<'static>,
compressor: Option<Compressor<'static>>,
}Expand description
Additional context that may be needed for compression.
In the case of zstd, this will contain the zstd context, which can be reused between subsequent
compression calls to avoid the performance overhead of initialising a new context for every
compression. Also holds a [FlatBufferBuilder] that is reused across IPC writes.
Fields§
§scratch: Vec<u8>§fbb: FlatBufferBuilder<'static>§compressor: Option<Compressor<'static>>Implementations§
Source§impl IpcWriteContext
impl IpcWriteContext
Sourcepub(crate) fn mut_fbb(&mut self) -> &mut FlatBufferBuilder<'static>
pub(crate) fn mut_fbb(&mut self) -> &mut FlatBufferBuilder<'static>
Get a mutable reference to the [FlatBufferBuilder] that is reused across IPC writes.
fn zstd_compressor(&mut self, level: i32) -> &mut Compressor<'static>
Trait Implementations§
Source§impl Debug for IpcWriteContext
impl Debug for IpcWriteContext
Source§impl Default for IpcWriteContext
impl Default for IpcWriteContext
Source§fn default() -> IpcWriteContext
fn default() -> IpcWriteContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IpcWriteContext
impl RefUnwindSafe for IpcWriteContext
impl Send for IpcWriteContext
impl Sync for IpcWriteContext
impl Unpin for IpcWriteContext
impl UnsafeUnpin for IpcWriteContext
impl UnwindSafe for IpcWriteContext
Blanket Implementations§
impl<T> Allocation for T
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