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

Method try_fetch

flow-rs/src/node/port.rs:140–150  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

138
139impl DynPorts<Receiver> {
140 pub fn try_fetch(&self) -> Option<(u64, Receiver)> {
141 for broker in self.brokers.values() {
142 if let Some(mut conns) = broker.try_fetch::<DynConns>() {
143 let conn = conns.outputs.remove(&self.target).unwrap_or_else(|| {
144 panic!("port {} not found in graph {}", self.target, broker.topic())
145 });
146 return Some((conns.name, conn));
147 }
148 }
149 None
150 }
151
152 pub async fn fetch(&self) -> Result<(u64, Receiver)> {
153 let fut: Vec<_> = self

Callers 1

fetch_with_cacheMethod · 0.45

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected