[−][src]Struct odbc_avro::AvroConfigurationBuilder
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]
self,
value: fn'i(_: &'i str) -> Result<Cow<'i, str>, NameNormalizationError>
) -> Self
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]
fn default() -> AvroConfigurationBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for AvroConfigurationBuilder
impl Send for AvroConfigurationBuilder
impl Sync for AvroConfigurationBuilder
impl Unpin for AvroConfigurationBuilder
impl UnwindSafe for AvroConfigurationBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToErrorNoContext<T> for T
fn to_root_cause(self) -> ErrorNoContext<T>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.