#[non_exhaustive]pub struct GcGenParams {
pub minor_multiplier: Option<c_int>,
pub minor_to_major: Option<c_int>,
pub major_to_minor: Option<c_int>,
}Available on crate features
lua55 or lua54 only.Expand description
Tuning parameters for the generational GC collector (Lua 5.4+).
More information can be found in the Lua documentation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.minor_multiplier: Option<c_int>Frequency of minor (young-generation) collection steps.
minor_to_major: Option<c_int>Threshold controlling how large the young generation can grow before triggering a shift from minor to major collection.
major_to_minor: Option<c_int>Available on crate feature
lua55 only.Threshold controlling how much the major collection must shrink the heap before switching back to minor (young-generation) collection.
Implementations§
Source§impl GcGenParams
impl GcGenParams
Sourcepub fn minor_multiplier(self, v: c_int) -> Self
pub fn minor_multiplier(self, v: c_int) -> Self
Sets the minor_multiplier parameter.
Sourcepub fn minor_to_major(self, v: c_int) -> Self
pub fn minor_to_major(self, v: c_int) -> Self
Sets the minor_to_major threshold.
Sourcepub fn major_to_minor(self, v: c_int) -> Self
Available on crate feature lua55 only.
pub fn major_to_minor(self, v: c_int) -> Self
lua55 only.Sets the major_to_minor parameter.
Trait Implementations§
Source§impl Clone for GcGenParams
impl Clone for GcGenParams
Source§fn clone(&self) -> GcGenParams
fn clone(&self) -> GcGenParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GcGenParams
impl Debug for GcGenParams
Source§impl Default for GcGenParams
impl Default for GcGenParams
Source§fn default() -> GcGenParams
fn default() -> GcGenParams
Returns the “default value” for a type. Read more
impl Copy for GcGenParams
Auto Trait Implementations§
impl Freeze for GcGenParams
impl RefUnwindSafe for GcGenParams
impl Send for GcGenParams
impl Sync for GcGenParams
impl Unpin for GcGenParams
impl UnsafeUnpin for GcGenParams
impl UnwindSafe for GcGenParams
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
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