Struct tokio_postgres::binary_copy::BinaryCopyInWriter [−][src]
pub struct BinaryCopyInWriter { /* fields omitted */ }
Expand description
A type which serializes rows into the PostgreSQL binary copy format.
The copy must be explicitly completed via the finish
method. If it is not, the copy will be aborted.
Implementations
Creates a new writer which will write rows of the provided types to the provided sink.
Writes a single row.
Panics
Panics if the number of values provided does not match the number expected.
pub async fn write_raw<P, I>(
self: Pin<&mut Self>,
values: I
) -> Result<(), Error> where
P: BorrowToSql,
I: IntoIterator<Item = P>,
I::IntoIter: ExactSizeIterator,
pub async fn write_raw<P, I>(
self: Pin<&mut Self>,
values: I
) -> Result<(), Error> where
P: BorrowToSql,
I: IntoIterator<Item = P>,
I::IntoIter: ExactSizeIterator,
A maximally-flexible version of write
.
Panics
Panics if the number of values provided does not match the number expected.