MCPcopy Index your code
hub / github.com/QMHTMY/RustBook / From

Interface From

publication/code/chapter01/code_style.rs:8–10  ·  view source on GitHub ↗

特性,trait

Source from the content-addressed store, hash-verified

6
7// 特性,trait
8pub trait From<T> {
9 fn from<T> -> Self;
10}
11
12// 结构体
13struct Rectangle {

Callers

nothing calls this directly

Implementers 2

integer_to_complex.rspublication/code/chapter01/integer_to_
rust_example.rspublication/code/chapter01/rust_exampl

Calls

no outgoing calls

Tested by

no test coverage detected