Struct show_notes::e024::Point
source · pub struct Point {
pub x: i32,
pub y: i32,
pub z: i32,
}
Expand description
A data structure which will implement std::ops::Add
.
With the implementation in place, we can do this:
let a = Point {
x: 123,
y: 234,
z: 345,
};
let b = Point {
x: 456,
y: 567,
z: 678,
};
let c = a + b;
Fields§
§x: i32
§y: i32
§z: i32
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more