pub struct AvroHandler;Expand description
Handler for Avro files
Implementations§
Source§impl AvroHandler
impl AvroHandler
pub fn new() -> Self
Sourcepub fn read(&self, path: &str) -> Result<Vec<Vec<String>>>
pub fn read(&self, path: &str) -> Result<Vec<Vec<String>>>
Read Avro file into Vec<Vec<String>>
Sourcepub fn read_with_headers(&self, path: &str) -> Result<Vec<Vec<String>>>
pub fn read_with_headers(&self, path: &str) -> Result<Vec<Vec<String>>>
Read Avro file with field names as first row
Trait Implementations§
Source§impl DataReader for AvroHandler
impl DataReader for AvroHandler
Source§fn read_with_headers(&self, path: &str) -> Result<Vec<Vec<String>>>
fn read_with_headers(&self, path: &str) -> Result<Vec<Vec<String>>>
Read data with headers (first row contains column names)
Source§fn read_range(&self, path: &str, range: &CellRange) -> Result<Vec<Vec<String>>>
fn read_range(&self, path: &str, range: &CellRange) -> Result<Vec<Vec<String>>>
Read a specific cell range from a file
Source§fn supports_format(&self, path: &str) -> bool
fn supports_format(&self, path: &str) -> bool
Check if the file format is supported
Source§impl DataWriter for AvroHandler
impl DataWriter for AvroHandler
Source§fn write(
&self,
path: &str,
data: &[Vec<String>],
options: DataWriteOptions,
) -> Result<()>
fn write( &self, path: &str, data: &[Vec<String>], options: DataWriteOptions, ) -> Result<()>
Write data to a file
Source§fn write_range(
&self,
path: &str,
data: &[Vec<String>],
_start_row: usize,
_start_col: usize,
) -> Result<()>
fn write_range( &self, path: &str, data: &[Vec<String>], _start_row: usize, _start_col: usize, ) -> Result<()>
Write data to a specific cell range
Source§fn append(&self, _path: &str, _data: &[Vec<String>]) -> Result<()>
fn append(&self, _path: &str, _data: &[Vec<String>]) -> Result<()>
Append data to an existing file
Source§fn supports_format(&self, path: &str) -> bool
fn supports_format(&self, path: &str) -> bool
Check if the file format is supported
Source§impl Default for AvroHandler
impl Default for AvroHandler
Source§fn default() -> AvroHandler
fn default() -> AvroHandler
Returns the “default value” for a type. Read more
Source§impl FileHandler for AvroHandler
impl FileHandler for AvroHandler
Source§fn format_name(&self) -> &'static str
fn format_name(&self) -> &'static str
Get the format name (e.g., “csv”, “xlsx”, “parquet”)
Source§fn supported_extensions(&self) -> &'static [&'static str]
fn supported_extensions(&self) -> &'static [&'static str]
Get supported file extensions
Source§impl SchemaProvider for AvroHandler
impl SchemaProvider for AvroHandler
Auto Trait Implementations§
impl Freeze for AvroHandler
impl RefUnwindSafe for AvroHandler
impl Send for AvroHandler
impl Sync for AvroHandler
impl Unpin for AvroHandler
impl UnsafeUnpin for AvroHandler
impl UnwindSafe for AvroHandler
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