pub struct ExecutionRecordBuilder { /* private fields */ }Expand description
Builder for creating execution records
Implementations§
Source§impl ExecutionRecordBuilder
impl ExecutionRecordBuilder
pub fn new(protocol_or_profile: &str, is_profile: bool) -> Self
pub fn tokens(self, input: u32, output: u32) -> Self
pub fn confidence(self, confidence: f64) -> Self
pub fn steps(self, completed: usize, total: usize) -> Self
pub fn success(self, success: bool) -> Self
pub fn error(self, error: impl Into<String>) -> Self
pub fn provider(self, provider: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
pub fn add_step_metric(self, metric: StepMetric) -> Self
pub fn build(self) -> ExecutionRecord
Trait Implementations§
Source§impl Debug for ExecutionRecordBuilder
impl Debug for ExecutionRecordBuilder
Source§impl Default for ExecutionRecordBuilder
impl Default for ExecutionRecordBuilder
Source§fn default() -> ExecutionRecordBuilder
fn default() -> ExecutionRecordBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExecutionRecordBuilder
impl RefUnwindSafe for ExecutionRecordBuilder
impl Send for ExecutionRecordBuilder
impl Sync for ExecutionRecordBuilder
impl Unpin for ExecutionRecordBuilder
impl UnwindSafe for ExecutionRecordBuilder
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> 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