pub struct RequestSummary {
pub id: Uuid,
pub batch_id: Option<Uuid>,
pub model: String,
pub status: String,
pub created_at: DateTime<Utc>,
pub completed_at: Option<DateTime<Utc>>,
pub failed_at: Option<DateTime<Utc>>,
pub duration_ms: Option<f64>,
pub response_status: Option<i16>,
pub service_tier: Option<String>,
pub created_by: String,
}Expand description
Summary of an individual request, suitable for list views.
Row scope: batchless-only. list_requests filters
WHERE r.created_by IS NOT NULL so the planner can use the partial
index idx_requests_user_*_sort. Batched rows are not returned here.
For batched-row attribution, fetch the row’s batches.created_by
separately or use RequestDetail (which joins batches).
Note: This type does not include user email or token/cost metrics. Callers should enrich with data from their own tables (users, analytics).
Fields§
§id: Uuid§batch_id: Option<Uuid>§model: String§status: String§created_at: DateTime<Utc>§completed_at: Option<DateTime<Utc>>§failed_at: Option<DateTime<Utc>>§duration_ms: Option<f64>§response_status: Option<i16>§service_tier: Option<String>§created_by: StringCreator ID (user or org) for ownership checks and email lookup.
Always set: list_requests only returns rows where
requests.created_by IS NOT NULL (see struct-level docs).
Trait Implementations§
Source§impl Clone for RequestSummary
impl Clone for RequestSummary
Source§fn clone(&self) -> RequestSummary
fn clone(&self) -> RequestSummary
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 RequestSummary
impl Debug for RequestSummary
Source§impl<'de> Deserialize<'de> for RequestSummary
impl<'de> Deserialize<'de> for RequestSummary
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
Source§impl From<RequestSummaryWithCount> for RequestSummary
impl From<RequestSummaryWithCount> for RequestSummary
Source§fn from(r: RequestSummaryWithCount) -> Self
fn from(r: RequestSummaryWithCount) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestSummary
impl RefUnwindSafe for RequestSummary
impl Send for RequestSummary
impl Sync for RequestSummary
impl Unpin for RequestSummary
impl UnsafeUnpin for RequestSummary
impl UnwindSafe for RequestSummary
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