pub struct ContextBudget {
pub max_bytes: usize,
pub max_items: usize,
pub max_lookups: usize,
pub max_files: usize,
}Fields§
§max_bytes: usizeMaximum compact JSON bytes in the result, excluding the response envelope.
max_items: usize§max_lookups: usize§max_files: usizeMaximum source files examined for incoming written-name and named-alias references.
Implementations§
Source§impl ContextBudget
impl ContextBudget
pub const MIN_BYTES: usize = 1024
pub const MAX_BYTES: usize = 1_048_576
pub const MAX_ITEMS: usize = 64
pub const MAX_LOOKUPS: usize = 512
pub const MAX_FILES: usize = 1024
pub const DEFAULT_BYTES: usize = 16_384
pub const DEFAULT_ITEMS: usize = 12
pub const DEFAULT_LOOKUPS: usize = 64
pub const DEFAULT_FILES: usize = 64
pub const MAXIMUM: Self
pub fn validate(&self) -> Result<(), EngineError>
Trait Implementations§
Source§impl Clone for ContextBudget
impl Clone for ContextBudget
Source§impl Debug for ContextBudget
impl Debug for ContextBudget
Source§impl Default for ContextBudget
impl Default for ContextBudget
Source§impl<'de> Deserialize<'de> for ContextBudgetwhere
ContextBudget: Default,
impl<'de> Deserialize<'de> for ContextBudgetwhere
ContextBudget: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextBudget
Source§impl PartialEq for ContextBudget
impl PartialEq for ContextBudget
Source§impl Serialize for ContextBudget
impl Serialize for ContextBudget
impl StructuralPartialEq for ContextBudget
Auto Trait Implementations§
impl Freeze for ContextBudget
impl RefUnwindSafe for ContextBudget
impl Send for ContextBudget
impl Sync for ContextBudget
impl Unpin for ContextBudget
impl UnsafeUnpin for ContextBudget
impl UnwindSafe for ContextBudget
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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