#[non_exhaustive]pub enum CopyFormat {
Text,
Csv {
delimiter: char,
null: String,
header: bool,
quote: char,
escape: char,
},
Binary,
}Expand description
Supported COPY formats.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
Text format (tab-separated, newline-terminated rows).
Csv
CSV format with options.
Fields
Binary
Binary format.
Implementations§
Source§impl CopyFormat
impl CopyFormat
Sourcepub fn to_sql_options(&self) -> String
pub fn to_sql_options(&self) -> String
Returns the SQL WITH (...) clause fragment for this format.
Trait Implementations§
Source§impl Clone for CopyFormat
impl Clone for CopyFormat
Source§fn clone(&self) -> CopyFormat
fn clone(&self) -> CopyFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CopyFormat
impl Debug for CopyFormat
Source§impl Default for CopyFormat
impl Default for CopyFormat
Source§fn default() -> CopyFormat
fn default() -> CopyFormat
Returns the “default value” for a type. Read more
Source§impl PartialEq for CopyFormat
impl PartialEq for CopyFormat
Source§fn eq(&self, other: &CopyFormat) -> bool
fn eq(&self, other: &CopyFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CopyFormat
impl StructuralPartialEq for CopyFormat
Auto Trait Implementations§
impl Freeze for CopyFormat
impl RefUnwindSafe for CopyFormat
impl Send for CopyFormat
impl Sync for CopyFormat
impl Unpin for CopyFormat
impl UnsafeUnpin for CopyFormat
impl UnwindSafe for CopyFormat
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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