[][src]Struct parquet::schema::types::PrimitiveTypeBuilder

pub struct PrimitiveTypeBuilder<'a> { /* fields omitted */ }

A builder for primitive types. All attributes are optional except the name and physical type. Note that if not specified explicitly, Repetition::OPTIONAL is used.

Implementations

impl<'a> PrimitiveTypeBuilder<'a>[src]

pub fn new(name: &'a str, physical_type: PhysicalType) -> Self[src]

Creates new primitive type builder with provided field name and physical type.

pub fn with_repetition(self, repetition: Repetition) -> Self[src]

Sets Repetition for this field and returns itself.

pub fn with_logical_type(self, logical_type: LogicalType) -> Self[src]

Sets LogicalType for this field and returns itself.

pub fn with_length(self, length: i32) -> Self[src]

Sets type length and returns itself. This is only applied to FIXED_LEN_BYTE_ARRAY and INT96 (INTERVAL) types, because they maintain fixed size underlying byte array. By default, value is 0.

pub fn with_precision(self, precision: i32) -> Self[src]

Sets precision for Parquet DECIMAL physical type and returns itself. By default, it equals to 0 and used only for decimal context.

pub fn with_scale(self, scale: i32) -> Self[src]

Sets scale for Parquet DECIMAL physical type and returns itself. By default, it equals to 0 and used only for decimal context.

pub fn with_id(self, id: i32) -> Self[src]

Sets optional field id and returns itself.

pub fn build(self) -> Result<Type>[src]

Creates a new PrimitiveType instance from the collected attributes. Returns Err in case of any building conditions are not met.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

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

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

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.

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.

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

impl<T> WithSubscriber for T[src]