pub struct CopyIn<'a> { /* private fields */ }Expand description
A COPY IN operation — streaming data to the server.
Created by sending a COPY ... FROM STDIN query.
Write rows via write_raw() or the format-specific helpers,
then call finish() to complete.
Implementations§
Source§impl<'a> CopyIn<'a>
impl<'a> CopyIn<'a>
Sourcepub fn format(&self) -> CopyFormat
pub fn format(&self) -> CopyFormat
The COPY format (Text or Binary).
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Number of columns expected per row.
Sourcepub async fn write_raw(&mut self, data: &[u8]) -> Result<()>
pub async fn write_raw(&mut self, data: &[u8]) -> Result<()>
Write raw COPY data. The data must be in the correct format (text or binary) as negotiated with the server.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CopyIn<'a>
impl<'a> !RefUnwindSafe for CopyIn<'a>
impl<'a> Send for CopyIn<'a>
impl<'a> Sync for CopyIn<'a>
impl<'a> Unpin for CopyIn<'a>
impl<'a> UnsafeUnpin for CopyIn<'a>
impl<'a> !UnwindSafe for CopyIn<'a>
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