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

Method new

chapter 4/server.rs:44–46  ·  view source on GitHub ↗
(blockchain: Blockchain)

Source from the content-addressed store, hash-verified

42
43impl Server {
44 pub fn new(blockchain: Blockchain) -> Server {
45 Server { blockchain }
46 }
47
48 pub fn run(&self, addr: &str) {
49 let listener = TcpListener::bind(addr).unwrap();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected