pub struct RawSourceConfig {
pub force_format: Option<DetectedFormat>,
pub has_header: Option<bool>,
pub delimiter: Option<char>,
pub max_rows: Option<usize>,
pub infer_types: bool,
pub source_description: Option<String>,
}Expand description
Configuration for raw source parsing
Fields§
§force_format: Option<DetectedFormat>Force a specific format (skip auto-detection)
has_header: Option<bool>Whether to treat first line as header (for CSV/TSV)
delimiter: Option<char>Custom delimiter (for CSV-like formats)
max_rows: Option<usize>Maximum rows to parse (for preview/sampling)
infer_types: boolInfer types from data (vs all strings)
source_description: Option<String>Source description (e.g., “Copied from Excel”, “Pasted from website”)
Implementations§
Source§impl RawSourceConfig
impl RawSourceConfig
Sourcepub fn with_format(self, format: DetectedFormat) -> Self
pub fn with_format(self, format: DetectedFormat) -> Self
Force a specific format
Sourcepub fn with_header(self, has_header: bool) -> Self
pub fn with_header(self, has_header: bool) -> Self
Set whether data has a header
Sourcepub fn with_delimiter(self, delimiter: char) -> Self
pub fn with_delimiter(self, delimiter: char) -> Self
Set custom delimiter
Sourcepub fn with_max_rows(self, max_rows: usize) -> Self
pub fn with_max_rows(self, max_rows: usize) -> Self
Set maximum rows to parse
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set source description
Trait Implementations§
Source§impl Clone for RawSourceConfig
impl Clone for RawSourceConfig
Source§fn clone(&self) -> RawSourceConfig
fn clone(&self) -> RawSourceConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 RawSourceConfig
impl Debug for RawSourceConfig
Source§impl Default for RawSourceConfig
impl Default for RawSourceConfig
Source§impl<'de> Deserialize<'de> for RawSourceConfig
impl<'de> Deserialize<'de> for RawSourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RawSourceConfig
impl RefUnwindSafe for RawSourceConfig
impl Send for RawSourceConfig
impl Sync for RawSourceConfig
impl Unpin for RawSourceConfig
impl UnsafeUnpin for RawSourceConfig
impl UnwindSafe for RawSourceConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.