struct Point { x: f64, y: f64 } impl Point { fn display_struct(s: &Point) { println!("s.x: {}; s.y: {}", s.x, s.y) } } fn main() { let s = Point {x: 5.0, y: 5.0}; Point::display_struct(&s) }