(directive: Directive)
| 77 | |
| 78 | impl FromDirective for Auth { |
| 79 | fn from_directive(directive: Directive) -> Result<Self, String> { |
| 80 | match directive.name.as_str() { |
| 81 | "auth" => Ok(Auth::Jwt), |
| 82 | "basic_auth" => Ok(Auth::Basic), |
| 83 | _ => Ok(Auth::None), |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | impl RouteAnnotation { |