pub struct MemoryExtractRequest { /* private fields */ }Expand description
How extract_reader_to_memory validates and stores an archive.
Every field has a default: the default SecurityConfig and
SinkOptions, the host path model, and a limit equal to the config’s
max_total_size (see MemoryLimit::from_config).
§Examples
use std::num::NonZeroU64;
use exarch_core::MemoryExtractRequest;
use exarch_core::MemoryLimit;
use exarch_core::PathModel;
let request = MemoryExtractRequest::default()
.with_limit(MemoryLimit::new(NonZeroU64::MIN))
.with_path_model(PathModel::Portable);Implementations§
Source§impl MemoryExtractRequest
impl MemoryExtractRequest
Sourcepub fn with_config(self, config: SecurityConfig) -> Self
pub fn with_config(self, config: SecurityConfig) -> Self
Validates against config.
Sourcepub const fn with_options(self, options: SinkOptions) -> Self
pub const fn with_options(self, options: SinkOptions) -> Self
Applies options to the extraction.
Sourcepub const fn with_limit(self, limit: MemoryLimit) -> Self
pub const fn with_limit(self, limit: MemoryLimit) -> Self
Caps the sink at limit instead of MemoryLimit::from_config.
Only extract_reader_to_memory has a sink to cap;
extract_reader_to_callback keeps
nothing and ignores it.
Sourcepub const fn with_path_model(self, model: PathModel) -> Self
pub const fn with_path_model(self, model: PathModel) -> Self
Validates against model instead of the host’s path rules.
Trait Implementations§
Source§impl Clone for MemoryExtractRequest
impl Clone for MemoryExtractRequest
Source§impl Debug for MemoryExtractRequest
impl Debug for MemoryExtractRequest
Auto Trait Implementations§
impl Freeze for MemoryExtractRequest
impl RefUnwindSafe for MemoryExtractRequest
impl Send for MemoryExtractRequest
impl Sync for MemoryExtractRequest
impl Unpin for MemoryExtractRequest
impl UnsafeUnpin for MemoryExtractRequest
impl UnwindSafe for MemoryExtractRequest
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