Struct arrow::json::reader::Reader[][src]

pub struct Reader<R: Read> { /* fields omitted */ }
Expand description

JSON file reader

Implementations

impl<R: Read> Reader<R>[src]

pub fn new(
    reader: R,
    schema: SchemaRef,
    batch_size: usize,
    projection: Option<Vec<String>>
) -> Self
[src]

Create a new JSON Reader from any value that implements the Read trait.

If reading a File, you can customise the Reader, such as to enable schema inference, use ReaderBuilder.

pub fn from_buf_reader(
    reader: BufReader<R>,
    schema: SchemaRef,
    batch_size: usize,
    projection: Option<Vec<String>>
) -> Self
[src]

Create a new JSON Reader from a BufReader<R: Read>

To customize the schema, such as to enable schema inference, use ReaderBuilder

pub fn schema(&self) -> SchemaRef[src]

Returns the schema of the reader, useful for getting the schema without reading record batches

pub fn next(&mut self) -> Result<Option<RecordBatch>>[src]

Read the next batch of records

Trait Implementations

impl<R: Debug + Read> Debug for Reader<R>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<R> RefUnwindSafe for Reader<R> where
    R: RefUnwindSafe

impl<R> Send for Reader<R> where
    R: Send

impl<R> Sync for Reader<R> where
    R: Sync

impl<R> Unpin for Reader<R> where
    R: Unpin

impl<R> UnwindSafe for Reader<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V