pub struct CallState<'a> {Show 20 fields
pub ts_nanos: i64,
pub tenant: &'a str,
pub user: &'a str,
pub role: &'a str,
pub question: &'a str,
pub sources_urns: &'a [String],
pub provider: &'a str,
pub model: &'a str,
pub prompt_tokens: i64,
pub completion_tokens: i64,
pub cost_usd: f64,
pub answer: &'a str,
pub citations: &'a [u32],
pub cache_hit: bool,
pub effective_mode: Mode,
pub temperature: Option<f32>,
pub seed: Option<u64>,
pub validation_ok: bool,
pub retry_count: u32,
pub errors: &'a [ValidationError],
}Expand description
All call state needed to render one audit row. Plain data — borrowed where cheap, owned only for the fields the caller almost always owns at insert time.
Fields§
§ts_nanos: i64Epoch nanoseconds. Injected by the caller (do not read the clock inside the builder).
tenant: &'a str§user: &'a str§role: &'a str§question: &'a str§sources_urns: &'a [String]§provider: &'a str§model: &'a str§prompt_tokens: i64§completion_tokens: i64§cost_usd: f64§answer: &'a strThe full LLM answer text. Always hashed; only stored when
Settings::include_answer == true.
citations: &'a [u32]1-indexed citation markers parsed from the answer.
cache_hit: bool§effective_mode: ModeThe mode effectively used — after provider capability fallback (#396), not the mode the user asked for.
temperature: Option<f32>§seed: Option<u64>§validation_ok: bool§retry_count: u32§errors: &'a [ValidationError]Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CallState<'a>
impl<'a> RefUnwindSafe for CallState<'a>
impl<'a> Send for CallState<'a>
impl<'a> Sync for CallState<'a>
impl<'a> Unpin for CallState<'a>
impl<'a> UnsafeUnpin for CallState<'a>
impl<'a> UnwindSafe for CallState<'a>
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<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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request