pub struct Baggage { /* private fields */ }Expand description
One key=value;properties member: value decoded, properties raw.
Implementations§
Source§impl Baggage
impl Baggage
Sourcepub fn parse(header: &str) -> Baggage
pub fn parse(header: &str) -> Baggage
Parse a baggage header value. Malformed members are skipped; members
past MAX_MEMBERS or MAX_BYTES are dropped.
Sourcepub fn to_header(&self) -> String
pub fn to_header(&self) -> String
The header value: members joined by ,, values percent-encoded.
Sourcepub fn set(&mut self, key: &str, value: &str) -> bool
pub fn set(&mut self, key: &str, value: &str) -> bool
Set key (replacing an existing value). A key that isn’t an HTTP
token, or a member past MAX_MEMBERS, is ignored; returns whether it
was set.
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Trait Implementations§
impl Eq for Baggage
impl StructuralPartialEq for Baggage
Auto Trait Implementations§
impl Freeze for Baggage
impl RefUnwindSafe for Baggage
impl Send for Baggage
impl Sync for Baggage
impl Unpin for Baggage
impl UnsafeUnpin for Baggage
impl UnwindSafe for Baggage
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.