Struct grpcio::MetadataBuilder
source · [−]pub struct MetadataBuilder { /* private fields */ }
Expand description
Builder for immutable Metadata.
Implementations
sourceimpl MetadataBuilder
impl MetadataBuilder
sourcepub fn new() -> MetadataBuilder
pub fn new() -> MetadataBuilder
Create a builder with empty initial capacity.
sourcepub fn with_capacity(cap: usize) -> MetadataBuilder
pub fn with_capacity(cap: usize) -> MetadataBuilder
Create a builder with the given value.
sourcepub fn add_str(
&mut self,
key: &str,
value: &str
) -> Result<&mut MetadataBuilder>
pub fn add_str(
&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.
Auto Trait Implementations
impl RefUnwindSafe for MetadataBuilder
impl Send for MetadataBuilder
impl Sync for MetadataBuilder
impl Unpin for MetadataBuilder
impl UnwindSafe for MetadataBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more