pub struct Owned<T>(/* private fields */);Expand description
Family for record types that do not borrow (owned payloads).
Trait Implementations§
§impl<T> Deserializer<Owned<T>> for AvroSerdeDeserializer<T>where
T: DeserializeOwned + Send + 'static,
impl<T> Deserializer<Owned<T>> for AvroSerdeDeserializer<T>where
T: DeserializeOwned + Send + 'static,
§fn deserialize<'buf>(
&mut self,
raw: &RawPayload<'buf>,
ack: &AckRef,
out: &mut dyn EmitRecord<'buf, T>,
) -> Result<(), DeserError>
fn deserialize<'buf>( &mut self, raw: &RawPayload<'buf>, ack: &AckRef, out: &mut dyn EmitRecord<'buf, T>, ) -> Result<(), DeserError>
Decode
raw, emitting each resulting record with the payload’s
metadata and a clone of ack.§impl Deserializer<Owned<Value>> for AvroValueDeserializer
impl Deserializer<Owned<Value>> for AvroValueDeserializer
§fn deserialize<'buf>(
&mut self,
raw: &RawPayload<'buf>,
ack: &AckRef,
out: &mut dyn EmitRecord<'buf, Value>,
) -> Result<(), DeserError>
fn deserialize<'buf>( &mut self, raw: &RawPayload<'buf>, ack: &AckRef, out: &mut dyn EmitRecord<'buf, Value>, ) -> Result<(), DeserError>
Decode
raw, emitting each resulting record with the payload’s
metadata and a clone of ack.Source§impl Deserializer<Owned<Vec<u8>>> for BytesPassthrough
impl Deserializer<Owned<Vec<u8>>> for BytesPassthrough
Source§fn deserialize<'buf>(
&mut self,
raw: &RawPayload<'buf>,
ack: &AckRef,
out: &mut dyn EmitRecord<'buf, Vec<u8>>,
) -> Result<(), DeserError>
fn deserialize<'buf>( &mut self, raw: &RawPayload<'buf>, ack: &AckRef, out: &mut dyn EmitRecord<'buf, Vec<u8>>, ) -> Result<(), DeserError>
Decode
raw, emitting each resulting record with the payload’s
metadata and a clone of ack.§impl RowEncoder<Owned<Vec<u8>>> for PreEncodedRows
impl RowEncoder<Owned<Vec<u8>>> for PreEncodedRows
§fn encode<'buf>(
&mut self,
rec: &Record<Vec<u8>>,
buf: &mut BytesMut,
) -> Result<(), SinkError>
fn encode<'buf>( &mut self, rec: &Record<Vec<u8>>, buf: &mut BytesMut, ) -> Result<(), SinkError>
Append
rec’s encoding to buf. Errors are record-level and
subject to the sink stage’s ErrorPolicy — except errors of
ErrorClass::Fatal, which stop
the pipeline regardless of policy (fatal means the encoder itself
is broken, e.g. the row type cannot match the target schema; every
subsequent record would fail identically).Source§fn buffered_bytes(&self) -> usize
fn buffered_bytes(&self) -> usize
Bytes the encoder is holding internally that have not yet been
flushed to a frame. Row formats append directly in
encode and buffer nothing, so the default is 0.
Columnar formats (which must transpose a whole block before any bytes
exist) return the approximate size of the block under assembly; the
terminal stage adds this to the shard buffer length when deciding
whether to seal a chunk, so a columnar block still respects
ChunkConfig::target_bytes.Source§fn finish_chunk(&mut self, buf: &mut BytesMut) -> Result<(), SinkError>
fn finish_chunk(&mut self, buf: &mut BytesMut) -> Result<(), SinkError>
Finalize the pending chunk: flush any internally-buffered rows into
buf as exactly one complete, self-describing wire frame, leaving
the encoder empty and ready for the next chunk. Row formats already
wrote every row in encode, so the default is a
no-op. The terminal stage calls this immediately before it seals each
EncodedChunk — in steady state, on data lulls, and at drain — so a
columnar encoder’s buffered rows are never silently dropped. Read moreAuto Trait Implementations§
impl<T> Freeze for Owned<T>
impl<T> RefUnwindSafe for Owned<T>
impl<T> Send for Owned<T>
impl<T> Sync for Owned<T>
impl<T> Unpin for Owned<T>
impl<T> UnsafeUnpin for Owned<T>
impl<T> UnwindSafe for Owned<T>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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