pub trait AsyncBytesPartialEncoderTraits:
AsyncBytesPartialDecoderTraits
+ Any
+ Send
+ Sync {
// Required methods
fn into_dyn_decoder(
self: Arc<Self>,
) -> Arc<dyn AsyncBytesPartialDecoderTraits>;
fn erase<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn partial_encode_many<'a, 'life0, 'life1, 'async_trait>(
&'a self,
offset_values: Box<dyn MaybeSendOffsetBytesIterator<Cow<'life0, [u8]>, Item = (u64, Cow<'life0, [u8]>)> + 'a>,
options: &'life1 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>
where 'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn supports_partial_encode(&self) -> bool;
// Provided method
fn partial_encode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
offset: u64,
bytes: Cow<'life1, [u8]>,
options: &'life2 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait { ... }
}Available on crate feature
async only.Expand description
Asynhronous partial bytes encoder traits.
Required Methods§
Sourcefn into_dyn_decoder(self: Arc<Self>) -> Arc<dyn AsyncBytesPartialDecoderTraits>
fn into_dyn_decoder(self: Arc<Self>) -> Arc<dyn AsyncBytesPartialDecoderTraits>
Return the encoder as an Arc<AsyncBytesPartialDecoderTraits>.
Sourcefn erase<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn erase<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sourcefn partial_encode_many<'a, 'life0, 'life1, 'async_trait>(
&'a self,
offset_values: Box<dyn MaybeSendOffsetBytesIterator<Cow<'life0, [u8]>, Item = (u64, Cow<'life0, [u8]>)> + 'a>,
options: &'life1 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn partial_encode_many<'a, 'life0, 'life1, 'async_trait>(
&'a self,
offset_values: Box<dyn MaybeSendOffsetBytesIterator<Cow<'life0, [u8]>, Item = (u64, Cow<'life0, [u8]>)> + 'a>,
options: &'life1 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
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.