pub struct TextOptions {
pub whole_text: Option<bool>,
pub line_sep: Option<String>,
pub common: CommonFileOptions,
}
Expand description
A struct that represents options for configuring text file parsing.
§Options
whole_text
: Read the entire file as a single string.line_sep
: Define the line separator (default is\n
).common
- Common file options that are shared across multiple file formats.
§Example
let options = TextOptions::new()
.whole_text(true)
.line_sep("\n".to_string())
.common.path_glob_filter("*.txt".to_string());
let df = spark.read().text(["/path/to/text"], options)?;
Fields§
§whole_text: Option<bool>
§line_sep: Option<String>
§common: CommonFileOptions
Implementations§
Source§impl TextOptions
impl TextOptions
Trait Implementations§
Source§impl Clone for TextOptions
impl Clone for TextOptions
Source§fn clone(&self) -> TextOptions
fn clone(&self) -> TextOptions
Returns a copy 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 ConfigOpts for TextOptions
impl ConfigOpts for TextOptions
Source§impl Debug for TextOptions
impl Debug for TextOptions
Source§impl Default for TextOptions
impl Default for TextOptions
Source§fn default() -> TextOptions
fn default() -> TextOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextOptions
impl RefUnwindSafe for TextOptions
impl Send for TextOptions
impl Sync for TextOptions
impl Unpin for TextOptions
impl UnwindSafe for TextOptions
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request