Struct http_types::trace::ServerTiming [−][src]
pub struct ServerTiming { /* fields omitted */ }
Expand description
Metrics and descriptions for the given request-response cycle.
Specifications
Examples
use http_types::Response; use http_types::trace::{ServerTiming, Metric}; let mut timings = ServerTiming::new(); timings.push(Metric::new("server".to_owned(), None, None)?); let mut res = Response::new(200); timings.apply(&mut res); let timings = ServerTiming::from_headers(res)?.unwrap(); let entry = timings.iter().next().unwrap(); assert_eq!(entry.name(), "server");
Implementations
Create a new instance from headers.
Get the HeaderName
.
Get the HeaderValue
.
An iterator visiting all server timings.
Trait Implementations
type Iter = IntoIter<HeaderValue>
type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
Converts this object to an iterator of resolved HeaderValues
.