pub struct PersistCompletedRealtimeInput {
pub request_id: Uuid,
pub response_body: String,
pub status_code: u16,
pub request_body: String,
pub model: String,
pub endpoint: String,
pub method: String,
pub path: String,
pub api_key: String,
pub created_by: String,
}Expand description
Input for persisting a batch of already-completed realtime responses.
Used by the dwctl responses writer to flush a buffer of finished realtime calls in one transaction.
Two cases are handled in the same batch:
- Background realtime: the row was pre-created in
processingstate bycreate_realtime; we UPDATE it tocompleted. - Non-background realtime: no row exists yet; we INSERT a template and
a request row directly in
completedstate.
All synthesize fields (request_body, model, endpoint, etc.) are
only consulted on the INSERT path. On the UPDATE path only request_id,
response_body, and status_code are used.
Fields§
§request_id: UuidThe request UUID (primary key).
response_body: StringUpstream response body to store.
status_code: u16Upstream HTTP status code.
request_body: StringOriginal request body, stored on the synthesized template.
model: StringModel identifier.
endpoint: StringBase URL of the target endpoint.
method: StringHTTP method (e.g., “POST”).
path: StringAPI path (e.g., “/v1/responses”).
api_key: StringAPI key for the request.
created_by: StringUser/org ID that owns this request.
Trait Implementations§
Source§impl Clone for PersistCompletedRealtimeInput
impl Clone for PersistCompletedRealtimeInput
Source§fn clone(&self) -> PersistCompletedRealtimeInput
fn clone(&self) -> PersistCompletedRealtimeInput
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 moreAuto Trait Implementations§
impl Freeze for PersistCompletedRealtimeInput
impl RefUnwindSafe for PersistCompletedRealtimeInput
impl Send for PersistCompletedRealtimeInput
impl Sync for PersistCompletedRealtimeInput
impl Unpin for PersistCompletedRealtimeInput
impl UnsafeUnpin for PersistCompletedRealtimeInput
impl UnwindSafe for PersistCompletedRealtimeInput
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