#[non_exhaustive]pub struct AvroSerializationOptions {
pub enable_display_name_attribute: bool,
pub picos_timestamp_precision: PicosTimestampPrecision,
/* private fields */
}Expand description
Contains options specific to Avro Serialization.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enable_display_name_attribute: boolEnable displayName attribute in Avro schema.
The Avro specification requires field names to be alphanumeric. By default, in cases when column names do not conform to these requirements (e.g. non-ascii unicode codepoints) and Avro is requested as an output format, the CreateReadSession call will fail.
Setting this field to true, populates avro field names with a placeholder value and populates a “displayName” attribute for every avro field with the original column name.
picos_timestamp_precision: PicosTimestampPrecisionOptional. Set timestamp precision option. If not set, the default precision is microseconds.
Implementations§
Source§impl AvroSerializationOptions
impl AvroSerializationOptions
Sourcepub fn set_enable_display_name_attribute<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_display_name_attribute<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_display_name_attribute.
§Example
ⓘ
let x = AvroSerializationOptions::new().set_enable_display_name_attribute(true);Sourcepub fn set_picos_timestamp_precision<T: Into<PicosTimestampPrecision>>(
self,
v: T,
) -> Self
pub fn set_picos_timestamp_precision<T: Into<PicosTimestampPrecision>>( self, v: T, ) -> Self
Sets the value of picos_timestamp_precision.
§Example
ⓘ
use google_cloud_bigquery::model::avro_serialization_options::PicosTimestampPrecision;
let x0 = AvroSerializationOptions::new().set_picos_timestamp_precision(PicosTimestampPrecision::TimestampPrecisionMicros);
let x1 = AvroSerializationOptions::new().set_picos_timestamp_precision(PicosTimestampPrecision::TimestampPrecisionNanos);
let x2 = AvroSerializationOptions::new().set_picos_timestamp_precision(PicosTimestampPrecision::TimestampPrecisionPicos);Trait Implementations§
Source§impl Clone for AvroSerializationOptions
impl Clone for AvroSerializationOptions
Source§impl Debug for AvroSerializationOptions
impl Debug for AvroSerializationOptions
Source§impl Default for AvroSerializationOptions
impl Default for AvroSerializationOptions
Source§impl Message for AvroSerializationOptions
impl Message for AvroSerializationOptions
Source§impl PartialEq for AvroSerializationOptions
impl PartialEq for AvroSerializationOptions
impl StructuralPartialEq for AvroSerializationOptions
Auto Trait Implementations§
impl Freeze for AvroSerializationOptions
impl RefUnwindSafe for AvroSerializationOptions
impl Send for AvroSerializationOptions
impl Sync for AvroSerializationOptions
impl Unpin for AvroSerializationOptions
impl UnsafeUnpin for AvroSerializationOptions
impl UnwindSafe for AvroSerializationOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request