pub struct Point { /* private fields */ }
Expand description
Immutable point type, consisting of x and y.
Implementations
sourceimpl Point
impl Point
pub fn from_ll(raw: SDL_Point) -> Point
pub fn raw_slice(slice: &[Point]) -> *const SDL_Point
pub fn raw(&self) -> *const SDL_Point
sourcepub fn offset(self, x: i32, y: i32) -> Point
pub fn offset(self, x: i32, y: i32) -> Point
Returns a new point by shifting this point’s coordinates by the given x and y values.
Trait Implementations
sourceimpl AddAssign<Point> for Point
impl AddAssign<Point> for Point
sourcefn add_assign(&mut self, rhs: Point)
fn add_assign(&mut self, rhs: Point)
Performs the +=
operation. Read more
sourceimpl DivAssign<i32> for Point
impl DivAssign<i32> for Point
sourcefn div_assign(&mut self, rhs: i32)
fn div_assign(&mut self, rhs: i32)
Performs the /=
operation. Read more
sourceimpl MulAssign<i32> for Point
impl MulAssign<i32> for Point
sourcefn mul_assign(&mut self, rhs: i32)
fn mul_assign(&mut self, rhs: i32)
Performs the *=
operation. Read more
sourceimpl SubAssign<Point> for Point
impl SubAssign<Point> for Point
sourcefn sub_assign(&mut self, rhs: Point)
fn sub_assign(&mut self, rhs: Point)
Performs the -=
operation. Read more
impl Copy for Point
impl Eq for Point
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more