pub struct TokioExtractor { /* private fields */ }Expand description
Secure Tokio extraction adapter.
Archive reads remain asynchronous. Capability-based filesystem operations run on one blocking worker behind a bounded channel, so neither the Tokio executor nor memory grows with archive size.
Implementations§
Source§impl TokioExtractor
impl TokioExtractor
Sourcepub fn new(root: Dir) -> Self
pub fn new(root: Dir) -> Self
Creates a safe-policy extractor rooted at a directory capability.
Sourcepub const fn with_policy(root: Dir, policy: ExtractionPolicy) -> Self
pub const fn with_policy(root: Dir, policy: ExtractionPolicy) -> Self
Creates an extractor with an explicit restore policy.
Sourcepub const fn with_limits(root: Dir, limits: Limits) -> Self
pub const fn with_limits(root: Dir, limits: Limits) -> Self
Creates a safe-policy extractor with explicit resource budgets.
Sourcepub const fn with_policy_and_limits(
root: Dir,
policy: ExtractionPolicy,
limits: Limits,
) -> Self
pub const fn with_policy_and_limits( root: Dir, policy: ExtractionPolicy, limits: Limits, ) -> Self
Creates an extractor with explicit policy and resource budgets.
Sourcepub async fn extract<R: AsyncRead + Unpin>(
self,
reader: &mut TokioArchiveReader<R>,
) -> Result<ExtractionReport, StreamError>
pub async fn extract<R: AsyncRead + Unpin>( self, reader: &mut TokioArchiveReader<R>, ) -> Result<ExtractionReport, StreamError>
Extracts from a sequential Tokio archive reader.
Sourcepub async fn extract_seek<R: AsyncRead + AsyncSeek + Unpin>(
self,
reader: &mut TokioSeekArchiveReader<R>,
) -> Result<ExtractionReport, StreamError>
pub async fn extract_seek<R: AsyncRead + AsyncSeek + Unpin>( self, reader: &mut TokioSeekArchiveReader<R>, ) -> Result<ExtractionReport, StreamError>
Extracts from a seek-capable Tokio archive reader.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TokioExtractor
impl RefUnwindSafe for TokioExtractor
impl Send for TokioExtractor
impl Sync for TokioExtractor
impl Unpin for TokioExtractor
impl UnsafeUnpin for TokioExtractor
impl UnwindSafe for TokioExtractor
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