pub struct GenerationResult {
pub data: Vec<Value>,
pub count: usize,
pub generation_time_ms: u128,
pub warnings: Vec<String>,
}
Expand description
Generation result
Fields§
§data: Vec<Value>
Generated data
count: usize
Number of rows generated
generation_time_ms: u128
Generation time in milliseconds
warnings: Vec<String>
Any warnings during generation
Implementations§
Source§impl GenerationResult
impl GenerationResult
Sourcepub fn with_warning(self, warning: String) -> Self
pub fn with_warning(self, warning: String) -> Self
Add a warning
Sourcepub fn to_json_string(&self) -> Result<String>
pub fn to_json_string(&self) -> Result<String>
Get data as JSON string
Sourcepub fn to_jsonl_string(&self) -> Result<String>
pub fn to_jsonl_string(&self) -> Result<String>
Get data as JSON Lines string
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GenerationResult
impl RefUnwindSafe for GenerationResult
impl Send for GenerationResult
impl Sync for GenerationResult
impl Unpin for GenerationResult
impl UnwindSafe for GenerationResult
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