pub struct Metadata {
pub entries: Vec<MetadataEntry>,
}Expand description
Request or response metadata.
Fields§
§entries: Vec<MetadataEntry>Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn from_headers(headers: Headers) -> Result<Metadata, MetadataDecodeError>
pub fn from_headers(headers: Headers) -> Result<Metadata, MetadataDecodeError>
Create metadata from HTTP/2 headers.
Sourcepub fn into_headers(self) -> Headers
pub fn into_headers(self) -> Headers
Convert metadata into HTTP/2 headers.
Sourcepub fn add(&mut self, key: MetadataKey, value: Bytes)
pub fn add(&mut self, key: MetadataKey, value: Bytes)
Add metadata object.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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