pub struct SlotLease<B> { /* private fields */ }Expand description
One frame’s hold on one slot: the bump cursor its uploads are placed at.
Released by Self::finish, which moves the slot in flight and returns
the token its fence waits on. A lease dropped without finishing leaves the
slot SlotState::Abandoned — whatever it recorded is still correct to
submit, but no re-map was asked for, so the slot is replaced rather than
reused.
Implementations§
Source§impl<B> SlotLease<B>
impl<B> SlotLease<B>
Sourcepub fn reserve(&mut self, len: u64, alignment: u64) -> Option<u64>
pub fn reserve(&mut self, len: u64, alignment: u64) -> Option<u64>
Places len bytes at the next multiple of alignment, returning
their offset, or None (placing nothing) when they do not fit.
Sourcepub fn finish(self) -> FenceToken
pub fn finish(self) -> FenceToken
Ends the frame’s hold: the slot goes in flight, waiting on the token.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for SlotLease<B>where
B: Freeze,
impl<B> RefUnwindSafe for SlotLease<B>where
B: RefUnwindSafe,
impl<B> Send for SlotLease<B>where
B: Send,
impl<B> Sync for SlotLease<B>where
B: Sync,
impl<B> Unpin for SlotLease<B>where
B: Unpin,
impl<B> UnsafeUnpin for SlotLease<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for SlotLease<B>where
B: UnwindSafe,
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