Skip to main content

grpc_timeout

Function grpc_timeout 

Source
pub fn grpc_timeout(val: &str) -> Option<Duration>
Expand description

Parses the grpc-timeout header value into a Duration.

The format is a positive integer followed by a unit suffix:

  • H: Hours
  • M: Minutes
  • S: Seconds
  • m: Milliseconds
  • u: Microseconds
  • n: Nanoseconds

§Parameters

  • val: The header value string.

§Returns

An Option<Duration> if parsing is successful, otherwise None.