pub struct StreamPolicy { /* private fields */ }Expand description
Controls limits and compatibility accepted by a tar frame stream.
Implementations§
Source§impl StreamPolicy
impl StreamPolicy
Sourcepub fn max_pax_extension_size(self, max_pax_extension_size: u64) -> Self
pub fn max_pax_extension_size(self, max_pax_extension_size: u64) -> Self
Configures the maximum size accepted for each pax extension.
A local or global header that declares a larger payload is rejected
before its payload is consumed. Setting the maximum to zero rejects
every nonempty extension. Setting it to u64::MAX removes the
per-extension bound; global extensions remain subject to their
cumulative limit.
Sourcepub fn max_global_pax_extensions_size(
self,
max_global_pax_extensions_size: u64,
) -> Self
pub fn max_global_pax_extensions_size( self, max_global_pax_extensions_size: u64, ) -> Self
Configures the maximum cumulative size of global pax extensions.
The total resets after each ordinary member. A global header that would
increase the pending total beyond this limit is rejected before its
payload is consumed. Setting the maximum to zero rejects every nonempty
global extension. Setting it to u64::MAX removes the cumulative
bound; each extension remains subject to its individual limit.
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 mode, uid, gid, and mtime
in both pax/ustar and GNU ordinary member headers. It is enabled by
default. Disabling it requires each field to use a valid numeric encoding
for its archive family.
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 size accepted for each GNU extension.
A GNU extension member that declares a larger payload is rejected before
its payload is consumed. Setting the maximum to zero rejects every nonempty
GNU extension member. Setting it to u64::MAX removes the per-extension bound.
Trait Implementations§
Source§impl Clone for StreamPolicy
impl Clone for StreamPolicy
Source§fn clone(&self) -> StreamPolicy
fn clone(&self) -> StreamPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more