pub struct PrintSinkOutput { /* private fields */ }Expand description
Parsed output from a print sink
Implementations§
Source§impl PrintSinkOutput
impl PrintSinkOutput
Sourcepub fn parse(output: &str) -> Self
pub fn parse(output: &str) -> Self
Parse print sink output from captured stderr/stdout
Format: “{row_count} -> (sample_every={n}) [{row_kind}] {json}”
Sourcepub fn has_column(&self, name: &str) -> bool
pub fn has_column(&self, name: &str) -> bool
Check if a column exists in any row
Sourcepub fn column_count(&self, name: &str) -> usize
pub fn column_count(&self, name: &str) -> usize
Count how many rows have a given column
Sourcepub fn column_values(&self, name: &str) -> Vec<&Value>
pub fn column_values(&self, name: &str) -> Vec<&Value>
Get all values for a column across all rows
Sourcepub fn rows(&self) -> &[PrintSinkRow]
pub fn rows(&self) -> &[PrintSinkRow]
Get all rows
Sourcepub fn column_names(&self) -> Vec<String>
pub fn column_names(&self) -> Vec<String>
Get column names from the first row
Sourcepub fn get(&self, index: usize) -> Option<&PrintSinkRow>
pub fn get(&self, index: usize) -> Option<&PrintSinkRow>
Get a specific row by index
Trait Implementations§
Source§impl Clone for PrintSinkOutput
impl Clone for PrintSinkOutput
Source§fn clone(&self) -> PrintSinkOutput
fn clone(&self) -> PrintSinkOutput
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 PrintSinkOutput
impl RefUnwindSafe for PrintSinkOutput
impl Send for PrintSinkOutput
impl Sync for PrintSinkOutput
impl Unpin for PrintSinkOutput
impl UnsafeUnpin for PrintSinkOutput
impl UnwindSafe for PrintSinkOutput
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 moreCreates a shared type from an unshared type.