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

Function is_close_f

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

Source from the content-addressed store, hash-verified

90 }
91 }
92 fn is_close_f((_, ident, ty): IterArgs) -> TokenStream {
93 if match_last_ty(ty, "Vec") {
94 quote_spanned! {ident.span()=>
95 for chan in &self.#ident {
96 is_closed = is_closed && chan.is_closed();
97 }
98 }
99 } else if match_last_ty(ty, "HashMap") {
100 quote_spanned! {ident.span()=>
101 for chan in self.#ident.values() {
102 is_closed = is_closed && chan.is_closed();
103 }
104 }
105 } else {
106 quote_spanned! (ident.span()=> is_closed = is_closed && self.#ident.is_closed();)
107 }
108 }
109
110 let seti = extract_ports(&input.data, type_name::IN_T, set_f);
111 let seto = extract_ports(&input.data, type_name::OUT_T, set_f);

Callers

nothing calls this directly

Calls 1

match_last_tyFunction · 0.85

Tested by

no test coverage detected