Struct stream_httparse::Headers [−][src]
pub struct Headers<'a> { /* fields omitted */ }
Expand description
A collection of Headers
Implementations
Creates a new Headers-Instance, for performance reasons
it is recommended to use the with_capacity
method
as that would avoid frequent reallocations
Creates the Headers-Object with the given Capacity prereserved for future Headers. This should be used when you already kind of know how many Headers this will hold, as it will avoid extra allocations in the future
Sets the Value of the of the Header for the given Key to the given Value
Behaviour
Checks if the Key is already present in the Collection and removes it if that is the case. Then adds the new Header to the End of the Collection
Appends the given Key-Value Pair to the end of the Collection, without checking if the Key is already present in the Collection
Removes the first Header, that matches the given Key, from the Collection
Searches the Collection for a Header that matches the given Key
Returns:
- None: if no Header matches the Key
- A Reference to the underlying Header-Value that belongs to the Key
Serializes the Collection of Headers into the given Buffer by append to it
Returns the Size in bytes of the biggest Value as text.
This means that all the Header-Values in this collection can fit in a buffer of this size.
Returns the Number of Headers in this collection
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Headers<'a>
impl<'a> UnwindSafe for Headers<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more