pub enum Kind {
RawValue(Bytes),
RawTimestampMicros(i64),
BytesValue(Bytes),
StringValue(String),
IntValue(i64),
BoolValue(bool),
FloatValue(f64),
TimestampValue(Timestamp),
DateValue(Date),
ArrayValue(ArrayValue),
}
Expand description
Options for transporting values within the protobuf type system. A given
kind
may support more than one type
and vice versa. On write, this is
roughly analogous to a GoogleSQL literal.
The value is NULL
if none of the fields in kind
is set. If type
is
also omitted on write, we will infer it based on the schema.
Variants§
RawValue(Bytes)
Represents a raw byte sequence with no type information.
The type
field must be omitted.
RawTimestampMicros(i64)
Represents a raw cell timestamp with no type information.
The type
field must be omitted.
BytesValue(Bytes)
Represents a typed value transported as a byte sequence.
StringValue(String)
Represents a typed value transported as a string.
IntValue(i64)
Represents a typed value transported as an integer.
BoolValue(bool)
Represents a typed value transported as a boolean.
FloatValue(f64)
Represents a typed value transported as a floating point number.
TimestampValue(Timestamp)
Represents a typed value transported as a timestamp.
DateValue(Date)
Represents a typed value transported as a date.
ArrayValue(ArrayValue)
Represents a typed value transported as a sequence of values.
To differentiate between Struct
, Array
, and Map
, the outermost
Value
must provide an explicit type
on write. This type
will
apply recursively to the nested Struct
fields, Array
elements,
or Map
key/value pairs, which must not supply their own type
.
Implementations§
source§impl Kind
impl Kind
sourcepub fn merge(
field: &mut Option<Kind>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Kind>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl PartialEq for Kind
impl PartialEq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl !Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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