pub trait BytesPartialEncoderTraits:
BytesPartialDecoderTraits
+ Any
+ MaybeSend
+ MaybeSync {
// Required methods
fn into_dyn_decoder(self: Arc<Self>) -> Arc<dyn BytesPartialDecoderTraits>;
fn erase(&self) -> Result<(), CodecError>;
fn partial_encode_many(
&self,
offset_values: OffsetBytesIterator<'_, ArrayBytesRaw<'_>>,
options: &CodecOptions,
) -> Result<(), CodecError>;
fn supports_partial_encode(&self) -> bool;
// Provided method
fn partial_encode(
&self,
offset: u64,
bytes: ArrayBytesRaw<'_>,
options: &CodecOptions,
) -> Result<(), CodecError> { ... }
}Expand description
Partial bytes encoder traits.
Required Methods§
Sourcefn into_dyn_decoder(self: Arc<Self>) -> Arc<dyn BytesPartialDecoderTraits>
fn into_dyn_decoder(self: Arc<Self>) -> Arc<dyn BytesPartialDecoderTraits>
Return the encoder as an Arc<BytesPartialDecoderTraits>.
Sourcefn erase(&self) -> Result<(), CodecError>
fn erase(&self) -> Result<(), CodecError>
Sourcefn partial_encode_many(
&self,
offset_values: OffsetBytesIterator<'_, ArrayBytesRaw<'_>>,
options: &CodecOptions,
) -> Result<(), CodecError>
fn partial_encode_many( &self, offset_values: OffsetBytesIterator<'_, ArrayBytesRaw<'_>>, options: &CodecOptions, ) -> Result<(), CodecError>
Partially encode a chunk from an OffsetBytesIterator.
§Errors
Returns CodecError if a codec fails or a byte range is invalid.
Sourcefn supports_partial_encode(&self) -> bool
fn supports_partial_encode(&self) -> bool
Returns whether this encoder supports partial encoding.
If this returns true, the encoder can efficiently handle partial encoding operations.
If this returns false, partial encoding will fall back to a full decode and encode operation.