Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
deflate_file in include_flate_codegen - Rust
[go: Go Back, main page]

deflate_file!() { /* proc-macro */ }
Expand description

deflate_file!("file") is equivalent to include_bytes!("file.gz").

Parameters

This macro accepts exactly one literal parameter that refers to a path relative to CARGO_MANIFEST_DIR. Absolute paths are not supported.

Note that this is distinct from the behaviour of the builtin include_bytes!/include_str! macrosincludle_bytes!/include_str! paths are relative to the current source file, while deflate_file! paths are relative to CARGO_MANIFEST_DIR.

Returns

This macro expands to a b"byte string" literal that contains the deflated form of the file.

Compile errors

  • If the argument is not a single literal
  • If the referenced file does not exist or is not readable