pub struct ResourceReservation { /* private fields */ }Expand description
A single ownership reservation released exactly once on Drop or release.
Implementations§
Source§impl ResourceReservation
impl ResourceReservation
Sourcepub fn promote_to_batch(&mut self, scope: ResourceScope) -> Result<()>
pub fn promote_to_batch(&mut self, scope: ResourceScope) -> Result<()>
Convert a byte-only reservation into the single batch ownership slot for a published
result. The caller must first release the source batch slot after the source batch is no
longer needed, so a max_in_flight_batches limit of one remains usable for transforms.
Sourcepub fn shrink_to(&mut self, bytes: u64)
pub fn shrink_to(&mut self, bytes: u64)
Retain only bytes of this reservation, returning any excess immediately.
This is used for bounded metadata probing: reserve before an opaque parser allocates, then retain its measured metadata footprint rather than pessimistically pinning the full execution budget for the lifetime of a source.
Trait Implementations§
Source§impl Debug for ResourceReservation
impl Debug for ResourceReservation
Source§impl Drop for ResourceReservation
impl Drop for ResourceReservation
Auto Trait Implementations§
impl Freeze for ResourceReservation
impl RefUnwindSafe for ResourceReservation
impl Send for ResourceReservation
impl Sync for ResourceReservation
impl Unpin for ResourceReservation
impl UnsafeUnpin for ResourceReservation
impl UnwindSafe for ResourceReservation
Blanket Implementations§
impl<T> Allocation for T
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