feat(headers): adds re-parsing ability when getting typed headers

BREAKING CHANGE: added requirement that all HeaderFormat implementations
  must also be fmt::Debug. This likely as easy as slapping
  #[derive(Debug)] on to any custom headers.
This commit is contained in:
Sean McArthur
2015-02-05 17:09:02 -08:00
parent 9e0770896b
commit df756871ed
10 changed files with 258 additions and 240 deletions

View File

@@ -54,7 +54,7 @@ impl<S: Scheme + 'static> HeaderFormat for Authorization<S> where <S as FromStr>
}
/// An Authorization scheme to be used in the header.
pub trait Scheme: FromStr + Clone + Send + Sync {
pub trait Scheme: FromStr + fmt::Debug + Clone + Send + Sync {
/// An optional Scheme name.
///
/// For example, `Basic asdf` has the name `Basic`. The Option<Self> is