MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / set_dyn_f

Function set_dyn_f

flow-derive/src/node.rs:72–82  ·  view source on GitHub ↗
((_, ident, ty): IterArgs)

Source from the content-addressed store, hash-verified

70 }
71 }
72 fn set_dyn_f((_, ident, ty): IterArgs) -> TokenStream {
73 if match_last_ty(ty, "DynPorts") {
74 quote_spanned! {ident.span()=>
75 if port_name == concat!("dyn@", stringify!(#ident)) {
76 self.#ident = flow_rs::node::DynPorts::new(cfg);
77 } else
78 }
79 } else {
80 quote! {}
81 }
82 }
83 fn close_f((_, ident, ty): IterArgs) -> TokenStream {
84 if match_last_ty(ty, "Vec") || match_last_ty(ty, "HashMap") {
85 quote_spanned! {ident.span()=>

Callers

nothing calls this directly

Calls 1

match_last_tyFunction · 0.85

Tested by

no test coverage detected