pub trait CompressIntoWith<From, To, A> {
type Error: Error + 'static + Send + Sync;
// Required method
fn compress_into_with(
&self,
from: From,
to: To,
with: A,
) -> Result<(), Self::Error>;
}Expand description
A trait implemented by a quantizer, indicating that it is capable of quantizing the
contents oF From into To with additional help from an argument of type A.
One example use case of the additional argument would be a
crate::alloc::ScopedAllocator through which scratch allocations can be made.
Required Associated Types§
Required Methods§
Sourcefn compress_into_with(
&self,
from: From,
to: To,
with: A,
) -> Result<(), Self::Error>
fn compress_into_with( &self, from: From, to: To, with: A, ) -> Result<(), Self::Error>
Compress the data in From into To.
If an error is encountered, To must be left in a valid but undefined state.