[−][src]Struct grpcio::MetadataBuilder
Builder for immutable Metadata.
Methods
impl MetadataBuilder
[src]
pub fn new() -> MetadataBuilder
[src]
Create a builder with empty initial capacity.
pub fn with_capacity(cap: usize) -> MetadataBuilder
[src]
Create a builder with the given value.
pub fn add_str(
&mut self,
key: &str,
value: &str
) -> Result<&mut MetadataBuilder>
[src]
&mut self,
key: &str,
value: &str
) -> Result<&mut MetadataBuilder>
Add a metadata holding an ASCII value.
key
must not use suffix (-bin) indicating a binary valued metadata entry.
pub fn add_bytes(
&mut self,
key: &str,
value: &[u8]
) -> Result<&mut MetadataBuilder>
[src]
&mut self,
key: &str,
value: &[u8]
) -> Result<&mut MetadataBuilder>
Add a metadata holding a binary value.
key
needs to have suffix (-bin) indicating a binary valued metadata entry.
pub fn build(self) -> Metadata
[src]
Create Metadata
with configured entries.
Auto Trait Implementations
impl !Send for MetadataBuilder
impl !Sync for MetadataBuilder
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,