pub unsafe trait OutputBuffer<T>: Sized {
// Required methods
fn slots(&mut self) -> &mut [MaybeUninit<T>];
unsafe fn finish(
self,
len: usize,
allocator: &BufferAllocatorRef,
) -> ArrayRef;
}Expand description
Engine-owned storage for collecting independent row values.
The executor initializes a prefix of slots, then calls finish.
Dropping the buffer instead abandons the output, including after an error or unwind.
§Safety
- Access through this trait must preserve slot count and contents between calls to
slots, including across moves of the buffer. - Dropping the buffer must be safe with any subset of its slots initialized.
Violating these requirements can cause undefined behavior in an executor or sink.
Required Methods§
Sourcefn slots(&mut self) -> &mut [MaybeUninit<T>]
fn slots(&mut self) -> &mut [MaybeUninit<T>]
Writable capacity whose initialized prefix is published by finish.
Sourceunsafe fn finish(self, len: usize, allocator: &BufferAllocatorRef) -> ArrayRef
unsafe fn finish(self, len: usize, allocator: &BufferAllocatorRef) -> ArrayRef
Publish the first len slots as an all-valid column, reusing storage where possible.
The column must contain exactly len rows in slot order. Any new payload buffers must
use allocator.
§Safety
The first len slots must exist and contain initialized values. Violating this requirement
can cause undefined behavior.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".