Skip to main content

DeserializerConfigBuilder

Struct DeserializerConfigBuilder 

Source
pub struct DeserializerConfigBuilder { /* private fields */ }
Expand description

Builds a DeserializerConfig.

The methods have the names of the setters of DeserializerConfig (without set_).

Implementations§

Source§

impl DeserializerConfigBuilder

Source

pub const fn new() -> DeserializerConfigBuilder

Creates a builder that starts with the default.

Source

pub const fn delimiter(self, delimiter: u8) -> DeserializerConfigBuilder

Sets the character that separates fields (, by default).

See DeserializerConfig::set_delimiter.

Source

pub const fn quote(self, quote: Option<u8>) -> DeserializerConfigBuilder

Sets the character that quotes fields (" by default).

See DeserializerConfig::set_quote.

Source

pub const fn double_quote(self, yes: bool) -> DeserializerConfigBuilder

Sets if two quotes in a quoted field are a quote (true by

See DeserializerConfig::set_double_quote.

Source

pub const fn escape(self, escape: Escape) -> DeserializerConfigBuilder

Sets how characters are escaped (not at all by default).

See DeserializerConfig::set_escape.

Source

pub const fn terminator( self, terminator: Terminator, ) -> DeserializerConfigBuilder

Sets what ends records (Terminator::Newline by default).

See DeserializerConfig::set_terminator.

Source

pub const fn comment(self, comment: Option<u8>) -> DeserializerConfigBuilder

Sets the character that starts comment lines (none by default).

See DeserializerConfig::set_comment.

Source

pub const fn headers(self, headers: Headers) -> DeserializerConfigBuilder

Sets where the names of the columns come from (Headers::First by

See DeserializerConfig::set_headers.

Source

pub const fn trim(self, trim: Trim) -> DeserializerConfigBuilder

Sets which whitespace is removed (Trim::None by default).

See DeserializerConfig::set_trim.

Source

pub const fn nulls(self, nulls: Nulls) -> DeserializerConfigBuilder

Sets which fields are null (Nulls::None by default).

See DeserializerConfig::set_nulls.

Source

pub const fn skip_blank_lines(self, yes: bool) -> DeserializerConfigBuilder

Sets if blank lines are skipped (true by default).

See DeserializerConfig::set_skip_blank_lines.

Source

pub const fn flexible(self, yes: bool) -> DeserializerConfigBuilder

Sets if records can have a different number of fields (false by

See DeserializerConfig::set_flexible.

Source

pub const fn lenient_quotes(self, yes: bool) -> DeserializerConfigBuilder

Sets if quotes that do not follow the rules are accepted (false by

See DeserializerConfig::set_lenient_quotes.

Source

pub const fn sep_line(self, yes: bool) -> DeserializerConfigBuilder

Sets if a sep= line at the start selects the delimiter (false by

See DeserializerConfig::set_sep_line.

Source

pub const fn max_record_len(self, len: usize) -> DeserializerConfigBuilder

Sets the maximum length of a record in a stream in bytes (64 MiB by

See DeserializerConfig::set_max_record_len.

Source

pub fn context(self, context: Context) -> DeserializerConfigBuilder

Sets the context the values are deserialized in.

See DeserializerConfig::set_context.

Source

pub const fn build(self) -> DeserializerConfig

Returns the built DeserializerConfig.

Trait Implementations§

Source§

impl Clone for DeserializerConfigBuilder

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DeserializerConfigBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DeserializerConfigBuilder

Source§

fn default() -> DeserializerConfigBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.