pub struct TableFieldSchema {
pub categories: Option<TableFieldSchemaCategories>,
pub description: Option<String>,
pub fields: Option<Vec<TableFieldSchema>>,
pub mode: Option<String>,
pub name: String,
pub policy_tags: Option<TableFieldSchemaPolicyTags>,
pub type: FieldType,
}
Fields
categories: Option<TableFieldSchemaCategories>
description: Option<String>
[Optional] The field description. The maximum length is 1,024 characters.
fields: Option<Vec<TableFieldSchema>>
[Optional] Describes the nested schema fields if the type property is set to RECORD.
mode: Option<String>
[Optional] The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default value is NULLABLE.
name: String
[Required] The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum length is 128 characters.
type: FieldType
[Required] The field data type. Possible values include STRING, BYTES, INTEGER, INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), NUMERIC, BIGNUMERIC, BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates that the field contains a nested schema) or STRUCT (same as RECORD).
Implementations
sourceimpl TableFieldSchema
impl TableFieldSchema
pub fn new(field_name: &str, field_type: FieldType) -> Self
pub fn integer(field_name: &str) -> Self
pub fn float(field_name: &str) -> Self
pub fn bool(field_name: &str) -> Self
pub fn string(field_name: &str) -> Self
pub fn record(field_name: &str, fields: Vec<TableFieldSchema>) -> Self
pub fn bytes(field_name: &str) -> Self
pub fn numeric(field_name: &str) -> Self
pub fn big_numeric(field_name: &str) -> Self
pub fn timestamp(field_name: &str) -> Self
pub fn date(field_name: &str) -> Self
pub fn time(field_name: &str) -> Self
pub fn date_time(field_name: &str) -> Self
Trait Implementations
sourceimpl Clone for TableFieldSchema
impl Clone for TableFieldSchema
sourcefn clone(&self) -> TableFieldSchema
fn clone(&self) -> TableFieldSchema
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TableFieldSchema
impl Debug for TableFieldSchema
sourceimpl<'de> Deserialize<'de> for TableFieldSchema
impl<'de> Deserialize<'de> for TableFieldSchema
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for TableFieldSchema
impl Serialize for TableFieldSchema
Auto Trait Implementations
impl RefUnwindSafe for TableFieldSchema
impl Send for TableFieldSchema
impl Sync for TableFieldSchema
impl Unpin for TableFieldSchema
impl UnwindSafe for TableFieldSchema
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more