pub struct RpcMetadata { /* private fields */ }Expand description
Metadata attached to a single high-level client RPC.
Per-call values take precedence over metadata configured on the connection.
Implementations§
Source§impl RpcMetadata
impl RpcMetadata
Sourcepub fn insert(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
) -> Result<Option<String>, RpcMetadataError>
pub fn insert( &mut self, key: impl Into<String>, value: impl Into<String>, ) -> Result<Option<String>, RpcMetadataError>
Insert an ASCII metadata value, returning the previous value for the key.
Sourcepub fn insert_binary(
&mut self,
key: impl Into<String>,
value: impl Into<Vec<u8>>,
) -> Result<Option<Vec<u8>>, RpcMetadataError>
pub fn insert_binary( &mut self, key: impl Into<String>, value: impl Into<Vec<u8>>, ) -> Result<Option<Vec<u8>>, RpcMetadataError>
Insert a binary metadata value, returning the previous value for the key.
Sourcepub fn remove_ascii(&mut self, key: &str) -> Option<String>
pub fn remove_ascii(&mut self, key: &str) -> Option<String>
Remove an ASCII metadata value.
Trait Implementations§
Source§impl Clone for RpcMetadata
impl Clone for RpcMetadata
Source§fn clone(&self) -> RpcMetadata
fn clone(&self) -> RpcMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RpcMetadata
impl Debug for RpcMetadata
Source§impl Default for RpcMetadata
impl Default for RpcMetadata
Source§fn default() -> RpcMetadata
fn default() -> RpcMetadata
Returns the “default value” for a type. Read more
impl Eq for RpcMetadata
Auto Trait Implementations§
impl Freeze for RpcMetadata
impl RefUnwindSafe for RpcMetadata
impl Send for RpcMetadata
impl Sync for RpcMetadata
impl Unpin for RpcMetadata
impl UnsafeUnpin for RpcMetadata
impl UnwindSafe for RpcMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Wrap the input message
T in a tonic::Request