pub struct ArrowStreamDeframer { /* private fields */ }Expand description
Reassembles Arrow IPC stream chunks into complete ArrowFrames.
§Frame format (simplified)
4 bytes continuation marker (must be 0xFF_FF_FF_FF)
4 bytes metadata length LE u32 (0 → EOS)
N bytes metadata flatbuffer
8 bytes body length LE u64 (only when metadata_length > 0)
M bytes bodyImplementations§
Source§impl ArrowStreamDeframer
impl ArrowStreamDeframer
Sourcepub fn with_limits(max_metadata_bytes: u32, max_body_bytes: u64) -> Self
pub fn with_limits(max_metadata_bytes: u32, max_body_bytes: u64) -> Self
Create a deframer with explicit limits.
Sourcepub fn is_idle(&self) -> bool
pub fn is_idle(&self) -> bool
Returns true when the deframer is idle (waiting for the next frame’s
continuation marker), i.e., no partial frame is buffered.
Sourcepub fn stats(&self) -> Arc<DeframerStats> ⓘ
pub fn stats(&self) -> Arc<DeframerStats> ⓘ
Return a clone of the shared statistics handle.
Sourcepub fn push(&mut self, data: &[u8]) -> Result<Vec<ArrowFrame>, DeframerError>
pub fn push(&mut self, data: &[u8]) -> Result<Vec<ArrowFrame>, DeframerError>
Feed data into the deframer. Returns all complete frames assembled
during this call, or a DeframerError if the stream is malformed.
On error the deframer is automatically reset so the caller may attempt to continue with later data (e.g., after re-synchronisation).
Trait Implementations§
Source§impl Debug for ArrowStreamDeframer
impl Debug for ArrowStreamDeframer
Auto Trait Implementations§
impl Freeze for ArrowStreamDeframer
impl RefUnwindSafe for ArrowStreamDeframer
impl Send for ArrowStreamDeframer
impl Sync for ArrowStreamDeframer
impl Unpin for ArrowStreamDeframer
impl UnsafeUnpin for ArrowStreamDeframer
impl UnwindSafe for ArrowStreamDeframer
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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 more