hyperium / headers

Typed HTTP Headers from hyper
https://hyper.rs
MIT License
162 stars 84 forks source link

feat: Add more conversions for `RetryAfter` #188

Open zecakeh opened 2 months ago

zecakeh commented 2 months ago

The From implementations are added for convenience.

The TryFrom implementations are necessary to access the inner values from the receiving side. Using TryFrom allows to match on the value.

Maybe methods like as_date and as_delay could also be implemented to access the inner value.