pub struct ForeignPermit<T> {
pub item: T,
pub permit: Box<ResourcePermit>,
}Expand description
A push rejected because its permit belongs to another budget tree.
The item and its unchanged permit are returned together. The permit still holds the charge the caller acquired, so dropping it here would release capacity that the caller is still accounting for.
The permit is boxed because a ResourcePermit inlines its ancestor
reservations and this is only reachable when a caller passes a permit from
an unrelated budget tree.
Fields§
§item: TThe item that was not enqueued.
permit: Box<ResourcePermit>The unchanged permit, still holding its charge.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ForeignPermit<T>
impl<T> !UnwindSafe for ForeignPermit<T>
impl<T> Freeze for ForeignPermit<T>where
T: Freeze,
impl<T> Send for ForeignPermit<T>where
T: Send,
impl<T> Sync for ForeignPermit<T>where
T: Sync,
impl<T> Unpin for ForeignPermit<T>where
T: Unpin,
impl<T> UnsafeUnpin for ForeignPermit<T>where
T: UnsafeUnpin,
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