MCPcopy Create free account
hub / github.com/PacktPublishing/Rust-for-Blockchain-Application-Development / first

Method first

chapter 4/node.rs:48–54  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

46 }
47
48 pub fn first(&self) -> Option<Node> {
49 let inner = self.inner.read().unwrap();
50 if let Some(node) = inner.first() {
51 return Some(node.clone());
52 }
53 None
54 }
55
56 pub fn get_nodes(&self) -> Vec<Node> {
57 self.inner.read().unwrap().to_vec()

Callers 1

serveFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected