Struct http_types::trace::server_timing::Metric [−][src]
pub struct Metric { /* fields omitted */ }
An individual entry into ServerTiming
.
Implementations
impl Metric
[src]
impl Metric
[src]pub fn new(
name: String,
dur: Option<Duration>,
desc: Option<String>
) -> Result<Self>
[src]
name: String,
dur: Option<Duration>,
desc: Option<String>
) -> Result<Self>
Create a new instance of Metric
.
Errors
An error will be returned if the string values are invalid ASCII.
pub fn name(&self) -> &String
[src]
The timing name.
pub fn duration(&self) -> Option<Duration>
[src]
The timing duration.
pub fn description(&self) -> Option<&str>
[src]
The timing description.
Trait Implementations
impl From<Metric> for HeaderValue
[src]
impl From<Metric> for HeaderValue
[src]fn from(entry: Metric) -> HeaderValue
[src]
impl StructuralEq for Metric
[src]
impl StructuralEq for Metric
[src]impl StructuralPartialEq for Metric
[src]
impl StructuralPartialEq for Metric
[src]Auto Trait Implementations
impl RefUnwindSafe for Metric
impl RefUnwindSafe for Metric
impl UnwindSafe for Metric
impl UnwindSafe for Metric