pub enum TypeKind {
}
Expand description
The kind of type.
Variants§
Dyn(())
Dynamic type.
Null(i32)
Null value.
Primitive(i32)
Primitive types: true
, 1u
, -2.0
, 'string'
, b'bytes'
.
Wrapper(i32)
Wrapper of a primitive type, e.g. google.protobuf.Int64Value
.
WellKnown(i32)
Well-known protobuf type such as google.protobuf.Timestamp
.
ListType(Box<ListType>)
Parameterized list with elements of list_type
, e.g. list<timestamp>
.
MapType(Box<MapType>)
Parameterized map with typed keys and values.
Function(Box<FunctionType>)
Function type.
MessageType(String)
Protocol buffer message type.
The message_type
string specifies the qualified message type name. For
example, google.plus.Profile
.
TypeParam(String)
Type param type.
The type_param
string specifies the type parameter name, e.g. list<E>
would be a list_type
whose element type was a type_param
type
named E
.
Type(Box<Type>)
Type type.
The type
value specifies the target type. e.g. int is type with a
target type of Primitive.INT
.
Error(())
Error type.
During type-checking if an expression is an error, its type is propagated
as the ERROR
type. This permits the type-checker to discover other
errors present in the expression.
AbstractType(AbstractType)
Abstract, application defined type.
Implementations§
source§impl TypeKind
impl TypeKind
sourcepub fn merge<B>(
field: &mut Option<TypeKind>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>(
field: &mut Option<TypeKind>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
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 TypeKind
impl PartialEq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnwindSafe for TypeKind
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