pub struct DecodePolicy { /* private fields */ }Expand description
Controls tar compatibility and the feature subset member decoding may accept.
See each configuration API for its default.
Implementations§
Source§impl DecodePolicy
impl DecodePolicy
Sourcepub fn allow_gnu(self, allow: bool) -> Self
pub fn allow_gnu(self, allow: bool) -> Self
Configures whether archives in the GNU framing family may be decoded.
GNU tar archives are allowed by default.
Users who wish to parse strictly pax-confirming tar archives may wish to disable this setting.
Sourcepub fn allow_all_nul_numeric_fields(self, allow: bool) -> Self
pub fn allow_all_nul_numeric_fields(self, allow: bool) -> Self
Configures whether wholly NUL numeric metadata fields may be accepted.
This compatibility option applies to the ordinary header’s mode, uid,
gid, and mtime fields in both pax/ustar and GNU archives. It is
enabled by default. When enabled, a wholly NUL field is represented
as missing; every other value must be a valid numeric encoding for its
archive family.
Sourcepub fn allow_header_uname_and_gname_without_terminator(
self,
allow: bool,
) -> Self
pub fn allow_header_uname_and_gname_without_terminator( self, allow: bool, ) -> Self
Configures whether ordinary header uname and gname fields may omit their NUL terminators.
This compatibility option applies to ordinary pax/ustar and GNU member headers and is disabled by default. Enabling it accepts names that occupy all 32 bytes of either field.
Sourcepub fn max_gnu_extension_size(self, max_gnu_extension_size: u64) -> Self
pub fn max_gnu_extension_size(self, max_gnu_extension_size: u64) -> Self
Configures the maximum payload size accepted for one GNU metadata extension.
The limit applies independently to long-name and long-link extensions.
An extension that declares a larger payload is rejected before its
payload is consumed. The default is DEFAULT_MAX_GNU_EXTENSION_SIZE.
Setting the limit to zero rejects every nonempty GNU extension. Setting
it to u64::MAX permits unbounded metadata buffering.
Sourcepub fn pax_policy(self, policy: PaxDecodePolicy) -> Self
pub fn pax_policy(self, policy: PaxDecodePolicy) -> Self
Configures the accepted pax feature subset.