pub struct PreparedUint8Ipc { /* private fields */ }Expand description
A prepared no-null UInt8 IPC fast-path encode.
The UInt8 construct-in-place path (used by send_output_raw and the
Python buffer-protocol send) sizes the sample from the layout and then
writes the header into it. Both steps need [uint8_layout], which builds
the schema + record-batch flatbuffer headers. This handle computes the
layout once and reuses it for both, instead of the double build a separate
uint8_ipc_len + encode_uint8_ipc_header pair incurs.
Implementations§
Source§impl PreparedUint8Ipc
impl PreparedUint8Ipc
Sourcepub fn new(data_len: usize) -> Result<Self>
pub fn new(data_len: usize) -> Result<Self>
Prepare the header for a no-null UInt8 array of data_len elements.
Fails if the resulting stream would exceed the IPC size limit.
Sourcepub fn byte_len(&self) -> usize
pub fn byte_len(&self) -> usize
Total IPC stream length. Use it to size the destination sample.
Sourcepub fn encode_header_into(&self, dst: &mut [u8]) -> Result<usize>
pub fn encode_header_into(&self, dst: &mut [u8]) -> Result<usize>
Write the IPC header into dst (which must be exactly
byte_len bytes) and return the offset at which the
caller must write the data_len data bytes. Same contract as
encode_uint8_ipc_header.
Auto Trait Implementations§
impl Freeze for PreparedUint8Ipc
impl RefUnwindSafe for PreparedUint8Ipc
impl Send for PreparedUint8Ipc
impl Sync for PreparedUint8Ipc
impl Unpin for PreparedUint8Ipc
impl UnsafeUnpin for PreparedUint8Ipc
impl UnwindSafe for PreparedUint8Ipc
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request