pub struct Component(/* private fields */);Available on crate feature
integrity only.Expand description
An RFC 9421 component identifier with ordered parameters.
Supports ordinary fields, sf, key, bs, tr, req, and the standard
request/response derived components. Boolean flags must be true. Unknown
component names or parameters are rejected, never silently discarded.
Implementations§
Source§impl Component
impl Component
Sourcepub fn new(name: &str) -> Result<Self, Error>
pub fn new(name: &str) -> Result<Self, Error>
Creates a plain lowercase field or derived-component identifier.
Sourcepub fn parse(value: &str) -> Result<Self, Error>
pub fn parse(value: &str) -> Result<Self, Error>
Parses an identifier such as "content-digest";tr or "@method";req.
Sourcepub fn to_field_value(&self) -> String
pub fn to_field_value(&self) -> String
Serializes the identifier, preserving parameter order and escaping.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Component
impl UnwindSafe for Component
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.