1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-13 15:12:20 +01:00

16 lines
368 B
Rust
Raw Normal View History

2018-05-30 16:43:39 +03:00
use headers::www_authenticate::Challenge;
use super::AuthenticationError;
pub trait ExtractorConfig {
type Inner: Challenge;
fn into_inner(self) -> Self::Inner;
}
impl<T> From<T> for AuthenticationError<<T as ExtractorConfig>::Inner> where T: ExtractorConfig {
fn from(config: T) -> Self {
AuthenticationError::new(config.into_inner())
}
}