pub struct RatioGuard { /* private fields */ }Expand description
Refuses a decode whose output outgrows its input implausibly.
Deliberately not a Read wrapper: Read::read can only return
std::io::Error, so a reader-based guard would box a typed error inside an
io error and force the caller to downcast it back. The copy loop calls
Self::record instead, and Error::ResourceLimit reaches exit_code()
as 6 without that round trip.
Implementations§
Auto Trait Implementations§
impl Freeze for RatioGuard
impl RefUnwindSafe for RatioGuard
impl Send for RatioGuard
impl Sync for RatioGuard
impl Unpin for RatioGuard
impl UnsafeUnpin for RatioGuard
impl UnwindSafe for RatioGuard
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