pub struct TapReaderBuilder { /* private fields */ }
Implementations§
Source§impl TapReaderBuilder
impl TapReaderBuilder
pub fn new() -> TapReaderBuilder
Sourcepub fn from_path<P: AsRef<Path>>(
path: P,
config: &TapConfig,
) -> Result<TapReader<File>>
pub fn from_path<P: AsRef<Path>>( path: P, config: &TapConfig, ) -> Result<TapReader<File>>
Build a TapReader from a path and a TapConfig
§Example
use dctap::TapReaderBuilder;
use dctap::TapConfig;
use std::error::Error;
fn example() -> Result<(), Box<dyn Error>> {
let mut tap = TapReaderBuilder::from_path("foo.csv", &TapConfig::default())?;
for result in tap.shapes() {
let shape = result?;
println!("{:?}", shape);
}
Ok(())
}
pub fn from_reader<R: Read>(rdr: R, config: &TapConfig) -> Result<TapReader<R>>
pub fn from_excel<R: Read, P: AsRef<Path>>( path: P, sheet_name: Option<&str>, config: &TapConfig, ) -> Result<TapReader<R>>
Trait Implementations§
Source§impl Default for TapReaderBuilder
impl Default for TapReaderBuilder
Source§fn default() -> TapReaderBuilder
fn default() -> TapReaderBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TapReaderBuilder
impl RefUnwindSafe for TapReaderBuilder
impl Send for TapReaderBuilder
impl Sync for TapReaderBuilder
impl Unpin for TapReaderBuilder
impl UnwindSafe for TapReaderBuilder
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> 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 more