pub struct CopyOut<T> { /* private fields */ }Expand description
A reader for a binary COPY ... TO STDOUT decoded into T.
Implementations§
Source§impl<T: FromCopyRow> CopyOut<T>
impl<T: FromCopyRow> CopyOut<T>
Sourcepub async fn next(&mut self) -> Result<Option<T>, Error>
pub async fn next(&mut self) -> Result<Option<T>, Error>
Reads the next row, or None at the end of the COPY stream.
§Errors
Returns a decode error for a malformed or truncated stream (a stream
that ends without the binary COPY trailer is an error, not a clean
end), a row larger than the configured limit, a server error, or an I/O
error.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CopyOut<T>
impl<T> RefUnwindSafe for CopyOut<T>
impl<T> Send for CopyOut<T>
impl<T> Sync for CopyOut<T>
impl<T> Unpin for CopyOut<T>
impl<T> UnsafeUnpin for CopyOut<T>
impl<T> UnwindSafe for CopyOut<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