MCPcopy Create free account
hub / github.com/derekbanas/Rust-Tutorial / area

Method area

main.rs:706–708  ·  view source on GitHub ↗

self allows us to refer to parameters for this struct

(&self)

Source from the content-addressed store, hash-verified

704
705 // self allows us to refer to parameters for this struct
706 fn area(&self) -> f32{
707 return self.length * self.width;
708 }
709 }
710
711 // Implement the trait for circle

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected