Struct msql_srv::RowWriter [−][src]
#[must_use]pub struct RowWriter<'a, W: Write> { /* fields omitted */ }
Expand description
Convenience type for sending rows of a resultset to a client.
Rows can either be written out one column at a time (using
write_col
and
end_row
), or one row at a time (using
write_row
).
This type may be dropped without calling
write_row
or
finish
. However, in this case, the program may panic
if an I/O error occurs when sending the end-of-records marker to the client. To avoid this,
call finish
explicitly.
Implementations
Write a value to the next column of the current row as a part of this resultset.
If you do not call end_row
after the last row,
any errors that occur when writing out the last row will be returned by
finish
. If you do not call finish
either, any
errors will cause a panic when the RowWriter
is dropped.
Note that the row must conform to the column specification provided to
QueryResultWriter::start
. If it does not,
this method will return an error indicating that an invalid value type or specification was
provided.
Indicate that no more column data will be written for the current row.
pub fn write_row<I, E>(&mut self, row: I) -> Result<()> where
I: IntoIterator<Item = E>,
E: ToMysqlValue,
[src]
pub fn write_row<I, E>(&mut self, row: I) -> Result<()> where
I: IntoIterator<Item = E>,
E: ToMysqlValue,
[src]Write a single row as a part of this resultset.
Note that the row must conform to the column specification provided to
QueryResultWriter::start
. If it does not,
this method will return an error indicating that an invalid value type or specification was
provided.
End this resultset response, and indicate to the client that no more rows are coming.
Trait Implementations
Auto Trait Implementations
impl<'a, W> RefUnwindSafe for RowWriter<'a, W> where
W: RefUnwindSafe,
impl<'a, W> !UnwindSafe for RowWriter<'a, W>