#[non_exhaustive]pub struct Type {
pub code: TypeCode,
pub array_element_type: Option<Box<Type>>,
pub struct_type: Option<Box<StructType>>,
pub type_annotation: TypeAnnotationCode,
pub proto_type_fqn: String,
/* private fields */
}Expand description
Type indicates the type of a Cloud Spanner value, as might be stored in a
table cell or returned from an SQL query.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: TypeCodeRequired. The TypeCode for this type.
array_element_type: Option<Box<Type>>§struct_type: Option<Box<StructType>>§type_annotation: TypeAnnotationCodeThe TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn’t affect serialization) and clients can ignore it on the read path.
proto_type_fqn: StringIf code ==
PROTO or
code ==
ENUM, then proto_type_fqn is the fully
qualified name of the proto type representing the proto/enum definition.
Implementations§
Source§impl Type
impl Type
Sourcepub fn set_array_element_type<T>(self, v: T) -> Self
pub fn set_array_element_type<T>(self, v: T) -> Self
Sets the value of array_element_type.
Sourcepub fn set_or_clear_array_element_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_array_element_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of array_element_type.
Sourcepub fn set_struct_type<T>(self, v: T) -> Selfwhere
T: Into<StructType>,
pub fn set_struct_type<T>(self, v: T) -> Selfwhere
T: Into<StructType>,
Sets the value of struct_type.
Sourcepub fn set_or_clear_struct_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<StructType>,
pub fn set_or_clear_struct_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<StructType>,
Sets or clears the value of struct_type.
Sourcepub fn set_type_annotation<T: Into<TypeAnnotationCode>>(self, v: T) -> Self
pub fn set_type_annotation<T: Into<TypeAnnotationCode>>(self, v: T) -> Self
Sets the value of type_annotation.
Sourcepub fn set_proto_type_fqn<T: Into<String>>(self, v: T) -> Self
pub fn set_proto_type_fqn<T: Into<String>>(self, v: T) -> Self
Sets the value of proto_type_fqn.
Trait Implementations§
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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
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>
T in a tonic::Request