pub struct BodyBudget {
pub bytes: usize,
pub approx_tokens: usize,
pub chunk_count: usize,
pub partition_count: usize,
pub exceeds_limits: bool,
}Expand description
Budget assessment of a body for the auto-split and dry-run paths (GAP-SG-05/06).
Fields§
§bytes: usizeTotal body length in bytes.
approx_tokens: usizeConservative cl100k token count of the whole body.
chunk_count: usizeNumber of embedding chunks the body splits into.
partition_count: usizeNumber of sub-memories auto-split would produce (1 when the body fits).
exceeds_limits: boolTrue when the body exceeds at least one single-memory budget and would be auto-split.
Trait Implementations§
Source§impl Clone for BodyBudget
impl Clone for BodyBudget
Source§fn clone(&self) -> BodyBudget
fn clone(&self) -> BodyBudget
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 BodyBudget
Auto Trait Implementations§
impl Freeze for BodyBudget
impl RefUnwindSafe for BodyBudget
impl Send for BodyBudget
impl Sync for BodyBudget
impl Unpin for BodyBudget
impl UnsafeUnpin for BodyBudget
impl UnwindSafe for BodyBudget
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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