pub struct CopyIn<T> { /* private fields */ }Expand description
A writer for a binary COPY ... FROM STDIN decoded from T.
Implementations§
Source§impl<T: ToRow> CopyIn<T>
impl<T: ToRow> CopyIn<T>
Sourcepub async fn write_row(&self, row: &T) -> Result<(), Error>
pub async fn write_row(&self, row: &T) -> Result<(), Error>
Writes one row.
Rows are encoded into a reusable buffer and coalesced into larger
CopyData messages, so a bulk load does not cost one allocation and one
network write per row.
§Errors
Returns an error if encoding fails or the connection is closed.
Auto Trait Implementations§
impl<T> !Freeze for CopyIn<T>
impl<T> !RefUnwindSafe for CopyIn<T>
impl<T> !UnwindSafe for CopyIn<T>
impl<T> Send for CopyIn<T>
impl<T> Sync for CopyIn<T>
impl<T> Unpin for CopyIn<T>
impl<T> UnsafeUnpin for CopyIn<T>
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