Struct grpcio::Metadata
[−]
[src]
#[repr(C)]pub struct Metadata(_);
A collection of metadata entries that can be exchanged during a call.
gRPC supports these types of metadata:
Request headers
They are sent by the client at the beginning of a remote call before any request messages are sent.
Response headers
They are sent by the server at the beginning of a remote call handler before any response messages are sent.
Response trailers
They are sent by the server at the end of a remote call along with resulting call status.
Metadata value can be ascii string or bytes. They are distinguish by the key suffix, key of bytes value should have suffix '-bin'.
Methods
impl Metadata
[src]
fn len(&self) -> usize
[src]
Returns the count of metadata entries.
fn is_empty(&self) -> bool
[src]
Returns true if there is no metadata entries.
fn get(&self, index: usize) -> Option<(&str, &[u8])>
[src]
Returns the metadata entry at the index
.
None
is returned if out of bound.
fn iter(&self) -> MetadataIter
[src]
Returns an iterator over the metadata entries.
Trait Implementations
impl Clone for Metadata
[src]
fn clone(&self) -> Metadata
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more