Skip to main content

parse_grpc_timeout

Function parse_grpc_timeout 

Source
pub fn parse_grpc_timeout(v: &str) -> Option<f64>
Expand description

Parse a gRPC grpc-timeout header value into a relative deadline in seconds.

Format is ASCII digits followed by a single unit char: Hours, Minutes, Seconds, millis, umicros, nanos (grpc-over-HTTP2 spec). Returns None for a malformed value — the deadline is advisory, so a bad header is ignored rather than failing the call.