pub struct FrameBudget(/* private fields */);Expand description
A shared byte budget for one export, still run or preview. Clones see the same budget; the work reads it before every frame and evicts to fit.
Implementations§
Source§impl FrameBudget
impl FrameBudget
Sourcepub fn new(bytes: u64) -> Self
pub fn new(bytes: u64) -> Self
A budget of bytes, never below MIN_FRAME_BYTES.
Sourcepub fn of_memory(capacity: &MemoryCapacity, ceiling: u64) -> Self
pub fn of_memory(capacity: &MemoryCapacity, ceiling: u64) -> Self
A quarter of the memory capacity leaves this process, at most ceiling. Without a
figure for it, ceiling.
Sourcepub fn halve(&self)
pub fn halve(&self)
Halves the budget, down to MIN_FRAME_BYTES.
Whether work other than this handle still holds the budget.
Trait Implementations§
Source§impl Clone for FrameBudget
impl Clone for FrameBudget
Auto Trait Implementations§
impl Forget for FrameBudget
impl Freeze for FrameBudget
impl Move for FrameBudget
impl RefUnwindSafe for FrameBudget
impl Send for FrameBudget
impl Sync for FrameBudget
impl Unpin for FrameBudget
impl UnsafeUnpin for FrameBudgetwhere
*const ArcInner<Atomic<u64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u64>>>: UnsafeUnpin,
impl UnwindSafe for FrameBudget
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more