MCPcopy Create free account
hub / github.com/Apress/beginning-rust-2e / drop

Method drop

Source Code/20-01.rs:16–18  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

14 }
15 impl Drop for CommunicationChannel {
16 fn drop(&mut self) {
17 println!("Closing port {}:{}", self.address, self.port);
18 }
19 }
20 impl CommunicationChannel {
21 fn create(address: &str, port: u16) -> CommunicationChannel {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected