MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / from_directive

Method from_directive

aiscript-directive/src/route/mod.rs:79–85  ·  view source on GitHub ↗
(directive: Directive)

Source from the content-addressed store, hash-verified

77
78impl 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
88impl RouteAnnotation {

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected