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

Interface HasMultiply

Source Code/19-27.rs:21–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 fn exp(self) -> Self { self.exp() }
20 }
21 trait HasMultiply<Rhs> {
22 fn multiply(self, rhs: Rhs) -> Self;
23 }
24 impl<Rhs> HasMultiply<Rhs> for f64 where Rhs: Into<Self> {
25 fn multiply(self, rhs: Rhs) -> Self { self * rhs.into() }
26 }

Callers

nothing calls this directly

Implementers 1

mainSource Code/19-27.rs

Calls

no outgoing calls

Tested by

no test coverage detected