pub struct ModuleQueryOutputBudgets {
pub per_field_bytes: u32,
pub total_bytes: u32,
}Expand description
Explicit byte budgets for a batched module query.
The default is 8 KiB per rendered field and 64 KiB for the combined
selector payload. Setters and ABI encoding clamp oversized values at
LEAN_DIAGNOSTIC_BYTE_LIMIT_MAX, so direct struct literals cannot send an
unbounded render request into Lean.
Fields§
§per_field_bytes: u32Maximum UTF-8 bytes for one rendered field.
total_bytes: u32Maximum estimated UTF-8 bytes for all selector results in the batch.
Implementations§
Source§impl ModuleQueryOutputBudgets
impl ModuleQueryOutputBudgets
Sourcepub fn per_field_bytes(self, bytes: u32) -> Self
pub fn per_field_bytes(self, bytes: u32) -> Self
Replace the per-field byte budget, saturating at
LEAN_DIAGNOSTIC_BYTE_LIMIT_MAX.
Sourcepub fn total_bytes(self, bytes: u32) -> Self
pub fn total_bytes(self, bytes: u32) -> Self
Replace the total batch byte budget, saturating at
LEAN_DIAGNOSTIC_BYTE_LIMIT_MAX.
Trait Implementations§
Source§impl Clone for ModuleQueryOutputBudgets
impl Clone for ModuleQueryOutputBudgets
Source§fn clone(&self) -> ModuleQueryOutputBudgets
fn clone(&self) -> ModuleQueryOutputBudgets
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 moreSource§impl Debug for ModuleQueryOutputBudgets
impl Debug for ModuleQueryOutputBudgets
Source§impl Default for ModuleQueryOutputBudgets
impl Default for ModuleQueryOutputBudgets
impl Eq for ModuleQueryOutputBudgets
Source§impl<'lean> IntoLean<'lean> for ModuleQueryOutputBudgets
impl<'lean> IntoLean<'lean> for ModuleQueryOutputBudgets
Source§fn into_lean(self, runtime: &'lean LeanRuntime) -> Obj<'lean>
fn into_lean(self, runtime: &'lean LeanRuntime) -> Obj<'lean>
Allocate (or scalar-box) a Lean representation of
self and return
the owned handle.Source§impl<'lean> LeanAbi<'lean> for ModuleQueryOutputBudgets
impl<'lean> LeanAbi<'lean> for ModuleQueryOutputBudgets
Source§impl<'lean> LeanAbi<'lean> for &ModuleQueryOutputBudgets
impl<'lean> LeanAbi<'lean> for &ModuleQueryOutputBudgets
Source§impl PartialEq for ModuleQueryOutputBudgets
impl PartialEq for ModuleQueryOutputBudgets
impl SealedAbi for ModuleQueryOutputBudgets
impl SealedAbi for &ModuleQueryOutputBudgets
impl StructuralPartialEq for ModuleQueryOutputBudgets
Auto Trait Implementations§
impl Freeze for ModuleQueryOutputBudgets
impl RefUnwindSafe for ModuleQueryOutputBudgets
impl Send for ModuleQueryOutputBudgets
impl Sync for ModuleQueryOutputBudgets
impl Unpin for ModuleQueryOutputBudgets
impl UnsafeUnpin for ModuleQueryOutputBudgets
impl UnwindSafe for ModuleQueryOutputBudgets
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<'lean, T> DecodeCallResult<'lean> for Twhere
T: LeanAbi<'lean>,
impl<'lean, T> DecodeCallResult<'lean> for Twhere
T: LeanAbi<'lean>,
const EXPECTS_IO_RESULT: bool = false
Source§type CRepr = <T as LeanAbi<'lean>>::CRepr
type CRepr = <T as LeanAbi<'lean>>::CRepr
The C-ABI return type of the Lake-emitted function. For the pure
path this is
T::CRepr (e.g. u8 for Bool exports, *mut lean_object for String); for the IO path it is always
*mut lean_object (the lean_io_result_* wrapper).