Struct ClaimOnOom
pub struct ClaimOnOom(/* private fields */);Expand description
An out-of-memory handler that attempts to claim the
memory within the given Span upon OOM.
The contained span is then overwritten with an empty span.
If the span is empty or claim fails, allocation failure occurs.
Implementations§
§impl ClaimOnOom
impl ClaimOnOom
Trait Implementations§
§impl OomHandler for ClaimOnOom
impl OomHandler for ClaimOnOom
§fn handle_oom(talc: &mut Talc<ClaimOnOom>, _: Layout) -> Result<(), ()>
fn handle_oom(talc: &mut Talc<ClaimOnOom>, _: Layout) -> Result<(), ()>
Given the allocator and the
layout of the allocation that caused
OOM, resize or claim and return Ok(()) or fail by returning Err(()). Read moreAuto Trait Implementations§
impl Freeze for ClaimOnOom
impl RefUnwindSafe for ClaimOnOom
impl Send for ClaimOnOom
impl !Sync for ClaimOnOom
impl Unpin for ClaimOnOom
impl UnsafeUnpin for ClaimOnOom
impl UnwindSafe for ClaimOnOom
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