MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / rpc_authz

Function rpc_authz

crates/openshell-server-macros/src/lib.rs:220–228  ·  view source on GitHub ↗
(args: TokenStream, item: TokenStream)

Source from the content-addressed store, hash-verified

218
219#[proc_macro_attribute]
220pub fn rpc_authz(args: TokenStream, item: TokenStream) -> TokenStream {
221 let args = parse_macro_input!(args as AuthzArgs);
222 let mut item = parse_macro_input!(item as ItemImpl);
223
224 match expand(&args, &mut item) {
225 Ok(tokens) => tokens.into(),
226 Err(err) => err.to_compile_error().into(),
227 }
228}
229
230fn expand(args: &AuthzArgs, item: &mut ItemImpl) -> Result<proc_macro2::TokenStream> {
231 // `trait_ident` is still called for its validation side effect: the

Callers

nothing calls this directly

Calls 1

expandFunction · 0.85

Tested by

no test coverage detected