pub struct DecompressionMonitor {
pub max_size: u64,
pub max_time: Duration,
pub start_time: Instant,
pub bytes_decompressed: Arc<AtomicU64>,
pub should_cancel: Arc<AtomicU64>,
}Expand description
Decompression monitor for tracking progress during decompression
Fields§
§max_size: u64Maximum allowed decompressed size
max_time: DurationMaximum allowed decompression time
start_time: InstantStart time of decompression
bytes_decompressed: Arc<AtomicU64>Current bytes decompressed (updated during decompression)
should_cancel: Arc<AtomicU64>Whether decompression should be cancelled
Implementations§
Source§impl DecompressionMonitor
impl DecompressionMonitor
Sourcepub fn check_progress(&self, current_output_size: u64) -> Result<()>
pub fn check_progress(&self, current_output_size: u64) -> Result<()>
Check if decompression should continue
Sourcepub fn request_cancellation(&self)
pub fn request_cancellation(&self)
Request cancellation of decompression
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecompressionMonitor
impl RefUnwindSafe for DecompressionMonitor
impl Send for DecompressionMonitor
impl Sync for DecompressionMonitor
impl Unpin for DecompressionMonitor
impl UnwindSafe for DecompressionMonitor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more