pub struct CopyEncoder<'a, 'c, W: Write + ?Sized> { /* private fields */ }Expand description
Text/CSV output over an existing sink. The encoder retains no row or encoded-output buffer; only the current value’s formatted text can own scratch memory.
Implementations§
Source§impl<'a, 'c, W: Write + ?Sized> CopyEncoder<'a, 'c, W>
impl<'a, 'c, W: Write + ?Sized> CopyEncoder<'a, 'c, W>
pub fn new( options: &'a CopyOptions, output: &'a mut W, engine: Option<&'a dyn EngineHook>, control: ProductionControl<'c>, ) -> Result<Self, SQLError>
pub fn write_header(&mut self, columns: &[String]) -> Result<(), SQLError>
Sourcepub fn write_row<'v>(
&mut self,
fields: impl IntoIterator<Item = (Option<&'v Value>, Option<&'v ColumnType>)>,
) -> Result<(), SQLError>
pub fn write_row<'v>( &mut self, fields: impl IntoIterator<Item = (Option<&'v Value>, Option<&'v ColumnType>)>, ) -> Result<(), SQLError>
Write one positional row, preserving separately valued duplicate column names and a missing value’s SQL NULL semantics.
Auto Trait Implementations§
impl<'a, 'c, W> !RefUnwindSafe for CopyEncoder<'a, 'c, W>
impl<'a, 'c, W> !Send for CopyEncoder<'a, 'c, W>
impl<'a, 'c, W> !Sync for CopyEncoder<'a, 'c, W>
impl<'a, 'c, W> !UnwindSafe for CopyEncoder<'a, 'c, W>
impl<'a, 'c, W> Freeze for CopyEncoder<'a, 'c, W>
impl<'a, 'c, W> Unpin for CopyEncoder<'a, 'c, W>
impl<'a, 'c, W> UnsafeUnpin for CopyEncoder<'a, 'c, W>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more