#[non_exhaustive]pub enum RequestCompression {
Brotli,
Gzip,
}Expand description
Algorithm used to compress large request bodies before they are sent.
The Apify API accepts both brotli (br) and gzip (gzip) request bodies. The reference JS
client picks between them automatically (brotli when available, gzip otherwise); this client
exposes the choice explicitly via
ApifyClientBuilder::request_compression,
because Rust’s brotli support is always compiled in and would leave no runtime path to gzip.
Brotli is the default (best ratio).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Brotli
Brotli (Content-Encoding: br). The default: best compression ratio, and the encoding the
reference client prefers.
Gzip
Gzip (Content-Encoding: gzip). Choose this for environments or intermediaries that do not
handle brotli.
Trait Implementations§
Source§impl Clone for RequestCompression
impl Clone for RequestCompression
Source§fn clone(&self) -> RequestCompression
fn clone(&self) -> RequestCompression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RequestCompression
Source§impl Debug for RequestCompression
impl Debug for RequestCompression
Source§impl Default for RequestCompression
impl Default for RequestCompression
Source§fn default() -> RequestCompression
fn default() -> RequestCompression
Returns the “default value” for a type. Read more
impl Eq for RequestCompression
Source§impl PartialEq for RequestCompression
impl PartialEq for RequestCompression
impl StructuralPartialEq for RequestCompression
Auto Trait Implementations§
impl Freeze for RequestCompression
impl RefUnwindSafe for RequestCompression
impl Send for RequestCompression
impl Sync for RequestCompression
impl Unpin for RequestCompression
impl UnsafeUnpin for RequestCompression
impl UnwindSafe for RequestCompression
Blanket Implementations§
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