pub struct NeverFail;Expand description
Policy that never injects a failure — every allocation proceeds to the inner allocator unchanged.
Faulty<I, NeverFail> is a transparent passthrough; useful as the
“injection disabled” arm of generic code that is parameterised over
an AllocFaultPolicy.
Trait Implementations§
Source§impl AllocFaultPolicy for NeverFail
impl AllocFaultPolicy for NeverFail
Source§fn should_fail(&self, _layout: NonZeroLayout) -> bool
fn should_fail(&self, _layout: NonZeroLayout) -> bool
Return
true to force the pending allocation of layout to
fail with AllocError; return false to
let it proceed to the inner allocator. Read moreimpl Copy for NeverFail
Auto Trait Implementations§
impl Freeze for NeverFail
impl RefUnwindSafe for NeverFail
impl Send for NeverFail
impl Sync for NeverFail
impl Unpin for NeverFail
impl UnsafeUnpin for NeverFail
impl UnwindSafe for NeverFail
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