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§
Source§impl 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
pub fn geography(field_name: &str) -> Self
pub fn json(field_name: &str) -> Self
Trait Implementations§
Source§impl Clone for TableFieldSchema
impl Clone for TableFieldSchema
Source§fn clone(&self) -> TableFieldSchema
fn clone(&self) -> TableFieldSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TableFieldSchema
impl Debug for TableFieldSchema
Source§impl<'de> Deserialize<'de> for TableFieldSchema
impl<'de> Deserialize<'de> for TableFieldSchema
Source§fn 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>,
Auto Trait Implementations§
impl Freeze for TableFieldSchema
impl RefUnwindSafe for TableFieldSchema
impl Send for TableFieldSchema
impl Sync for TableFieldSchema
impl Unpin for TableFieldSchema
impl UnwindSafe for TableFieldSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
T
in a tonic::Request