[][src]Struct odbc_avro::AvroConfigurationBuilder

pub struct AvroConfigurationBuilder { /* fields omitted */ }

Helper object that allows to build AvroConfiguration with custom settings.

Methods

impl AvroConfigurationBuilder[src]

pub fn with_reformat_json(self, value: impl Into<Option<ReformatJson>>) -> Self[src]

Sets reformatting options JSON columns.

If set to None JSON will be passed as a String as is, otherwise it will be parsed and formatted according to ReformatJson variant.

Default: None.

Note that this only applies to odbc-iter columns represented as Value::Json variant.

pub fn with_timestamp_format(self, value: TimestampFormat) -> Self[src]

Sets formatting style for TIMESTAMP columns.

Avro format cannot store native ODBC TIMESTAMP column values so they need to be processed according with TimestampFormat variant.

Default: TimestampFormat::DefaultString.

Note that this only applies to odbc-iter columns represented as Value::Timestamp variant.

pub fn with_name_nomralizer(
    self,
    value: fn'i(_: &'i str) -> Result<Cow<'i, str>, NameNormalizationError>
) -> Self
[src]

Sets normalizer function that will convert database table column names to Avro compatible record filed names.

Default: AvroName::default_normalizer

pub fn build(self) -> AvroConfiguration[src]

Builds final AvroConfiguration.

Trait Implementations

impl Default for AvroConfigurationBuilder[src]

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToErrorNoContext<T> for T

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<E, C> WrapContext<C> for E

type ContextError = ErrorContext<E, C>