27 lines
776 B
Rust
27 lines
776 B
Rust
use serde::{Deserialize, Serialize};
|
|
use serde_json::Value;
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct WindowExecutionResult {
|
|
pub summary: Value,
|
|
pub items: Vec<Value>,
|
|
#[serde(skip_serializing_if = "Option::is_none")]
|
|
pub cursor: Option<Value>,
|
|
pub window_complete: bool,
|
|
pub truncated: bool,
|
|
pub has_more: bool,
|
|
}
|
|
|
|
impl From<crank_core::WindowExecutionResult> for WindowExecutionResult {
|
|
fn from(value: crank_core::WindowExecutionResult) -> Self {
|
|
Self {
|
|
summary: value.summary,
|
|
items: value.items,
|
|
cursor: value.cursor,
|
|
window_complete: value.window_complete,
|
|
truncated: value.truncated,
|
|
has_more: value.has_more,
|
|
}
|
|
}
|
|
}
|