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
impl DeserializerConfigBuilder
Sourcepub const fn new() -> DeserializerConfigBuilder
pub const fn new() -> DeserializerConfigBuilder
Creates a builder that starts with the default.
Sourcepub const fn delimiter(self, delimiter: u8) -> DeserializerConfigBuilder
pub const fn delimiter(self, delimiter: u8) -> DeserializerConfigBuilder
Sets the character that separates fields (, by default).
Sourcepub const fn quote(self, quote: Option<u8>) -> DeserializerConfigBuilder
pub const fn quote(self, quote: Option<u8>) -> DeserializerConfigBuilder
Sets the character that quotes fields (" by default).
Sourcepub const fn double_quote(self, yes: bool) -> DeserializerConfigBuilder
pub const fn double_quote(self, yes: bool) -> DeserializerConfigBuilder
Sets if two quotes in a quoted field are a quote (true by
Sourcepub const fn escape(self, escape: Escape) -> DeserializerConfigBuilder
pub const fn escape(self, escape: Escape) -> DeserializerConfigBuilder
Sets how characters are escaped (not at all by default).
Sourcepub const fn terminator(
self,
terminator: Terminator,
) -> DeserializerConfigBuilder
pub const fn terminator( self, terminator: Terminator, ) -> DeserializerConfigBuilder
Sets what ends records (Terminator::Newline by default).
Sourcepub const fn comment(self, comment: Option<u8>) -> DeserializerConfigBuilder
pub const fn comment(self, comment: Option<u8>) -> DeserializerConfigBuilder
Sets the character that starts comment lines (none by default).
Sourcepub const fn headers(self, headers: Headers) -> DeserializerConfigBuilder
pub const fn headers(self, headers: Headers) -> DeserializerConfigBuilder
Sets where the names of the columns come from (Headers::First by
Sourcepub const fn trim(self, trim: Trim) -> DeserializerConfigBuilder
pub const fn trim(self, trim: Trim) -> DeserializerConfigBuilder
Sets which whitespace is removed (Trim::None by default).
Sourcepub const fn nulls(self, nulls: Nulls) -> DeserializerConfigBuilder
pub const fn nulls(self, nulls: Nulls) -> DeserializerConfigBuilder
Sets which fields are null (Nulls::None by default).
Sourcepub const fn skip_blank_lines(self, yes: bool) -> DeserializerConfigBuilder
pub const fn skip_blank_lines(self, yes: bool) -> DeserializerConfigBuilder
Sets if blank lines are skipped (true by default).
Sourcepub const fn flexible(self, yes: bool) -> DeserializerConfigBuilder
pub const fn flexible(self, yes: bool) -> DeserializerConfigBuilder
Sets if records can have a different number of fields (false by
Sourcepub const fn lenient_quotes(self, yes: bool) -> DeserializerConfigBuilder
pub const fn lenient_quotes(self, yes: bool) -> DeserializerConfigBuilder
Sets if quotes that do not follow the rules are accepted (false by
Sourcepub const fn sep_line(self, yes: bool) -> DeserializerConfigBuilder
pub const fn sep_line(self, yes: bool) -> DeserializerConfigBuilder
Sets if a sep= line at the start selects the delimiter (false by
Sourcepub const fn max_record_len(self, len: usize) -> DeserializerConfigBuilder
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
Sourcepub fn context(self, context: Context) -> DeserializerConfigBuilder
pub fn context(self, context: Context) -> DeserializerConfigBuilder
Sets the context the values are deserialized in.
Sourcepub const fn build(self) -> DeserializerConfig
pub const fn build(self) -> DeserializerConfig
Returns the built DeserializerConfig.