Struct google_api_proto::google::cloud::visionai::v1alpha1::PacketHeader
source · pub struct PacketHeader {
pub capture_time: Option<Timestamp>,
pub type: Option<PacketType>,
pub metadata: Option<Struct>,
pub server_metadata: Option<ServerMetadata>,
pub series_metadata: Option<SeriesMetadata>,
pub flags: i32,
pub trace_context: String,
}
Expand description
The message that represents packet header.
Fields§
§capture_time: Option<Timestamp>
Input only. The capture time of the packet.
type: Option<PacketType>
Input only. Immutable. The type of the payload.
metadata: Option<Struct>
Input only. This field is for users to attach user managed metadata.
server_metadata: Option<ServerMetadata>
Output only. Metadata that the server appends to each packet before sending it to receivers. You don’t need to set a value for this field when sending packets.
series_metadata: Option<SeriesMetadata>
Input only. Immutable. Metadata that the server needs to know where to write the packets to. It’s only required for the first packet.
flags: i32
Immutable. Packet flag set. SDK will set the flag automatically.
trace_context: String
Immutable. Header string for tracing across services. It should be set when the packet is first arrived in the stream server.
The input format is a lowercase hex string:
- version_id: 1 byte, currently must be zero - hex encoded (2 characters)
- trace_id: 16 bytes (opaque blob) - hex encoded (32 characters)
- span_id: 8 bytes (opaque blob) - hex encoded (16 characters)
- trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 characters) Example: “00-404142434445464748494a4b4c4d4e4f-6162636465666768-01” v trace_id span_id options
Trait Implementations§
source§impl Clone for PacketHeader
impl Clone for PacketHeader
source§fn clone(&self) -> PacketHeader
fn clone(&self) -> PacketHeader
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PacketHeader
impl Debug for PacketHeader
source§impl Default for PacketHeader
impl Default for PacketHeader
source§impl Message for PacketHeader
impl Message for PacketHeader
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for PacketHeader
impl PartialEq for PacketHeader
source§fn eq(&self, other: &PacketHeader) -> bool
fn eq(&self, other: &PacketHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PacketHeader
Auto Trait Implementations§
impl Freeze for PacketHeader
impl RefUnwindSafe for PacketHeader
impl Send for PacketHeader
impl Sync for PacketHeader
impl Unpin for PacketHeader
impl UnwindSafe for PacketHeader
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
Mutably borrows from an owned value. Read more
§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>
Wrap the input message
T
in a tonic::Request