普通初始化,需要derive Debug才可以通过{:?}方式打印:. #[derive(Debug)] struct Point { x: i32, y: i32, } fn main() { let p = Point { x: 5, y: 6 }; println!
確定! 回上一頁