pub struct GcIncParams { /* private fields */ }Expand description
Parameters for Luau’s incremental GC, mirroring mlua::state::GcIncParams.
On Luau the tunables are the goal (heap-growth target percentage),
the step multiplier, and the step size (KB). (Lua 5.x’s pause is
replaced by goal here — see GcIncParams::goal.)
Implementations§
Source§impl GcIncParams
impl GcIncParams
Sourcepub fn goal(self, goal: u32) -> Self
pub fn goal(self, goal: u32) -> Self
The heap-growth goal (percentage). Luau’s analog of Lua’s pause.
Mirrors mlua::state::GcIncParams::goal.
Sourcepub fn step_multiplier(self, mul: u32) -> Self
pub fn step_multiplier(self, mul: u32) -> Self
The GC step multiplier (percentage of allocation to collect per step).
Mirrors mlua::state::GcIncParams::step_multiplier.
Trait Implementations§
Source§impl Clone for GcIncParams
impl Clone for GcIncParams
Source§fn clone(&self) -> GcIncParams
fn clone(&self) -> GcIncParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GcIncParams
Source§impl Debug for GcIncParams
impl Debug for GcIncParams
Source§impl Default for GcIncParams
impl Default for GcIncParams
Source§fn default() -> GcIncParams
fn default() -> GcIncParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GcIncParams
impl RefUnwindSafe for GcIncParams
impl Send for GcIncParams
impl Sync for GcIncParams
impl Unpin for GcIncParams
impl UnsafeUnpin for GcIncParams
impl UnwindSafe for GcIncParams
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