#[non_exhaustive]pub struct Options {
pub op_budget: u64,
pub max_nodes: usize,
pub cache_capacity: usize,
}Expand description
Limits and caching of a Typesetter.
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.op_budget: u64Commands, macro calls and expansions one fragment may run before it fails with TypesetError::Budget.
max_nodes: usizeIR nodes one fragment may lower to before it fails with TypesetError::NodeLimit.
cache_capacity: usizeFragments the cache keeps, 0 turns caching off.
Implementations§
Source§impl Options
impl Options
Sourcepub fn with_op_budget(self, op_budget: u64) -> Self
pub fn with_op_budget(self, op_budget: u64) -> Self
Sets the per fragment work budget.
Sourcepub fn with_max_nodes(self, max_nodes: usize) -> Self
pub fn with_max_nodes(self, max_nodes: usize) -> Self
Sets the per fragment IR node cap.
Sourcepub fn with_cache_capacity(self, cache_capacity: usize) -> Self
pub fn with_cache_capacity(self, cache_capacity: usize) -> Self
Sets how many fragments the cache keeps.
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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