pub struct OnPlanePos { /* private fields */ }Expand description
Describes a position on a plane
Implementations§
Source§impl OnPlanePos
impl OnPlanePos
pub fn new(x: OnLinePos, y: OnLinePos) -> OnPlanePos
pub fn x(&self) -> OnLinePos
pub fn y(&self) -> OnLinePos
pub fn x_mut(&mut self) -> &mut OnLinePos
pub fn y_mut(&mut self) -> &mut OnLinePos
Sourcepub fn unit_percent(&self, size: Size) -> Point
pub fn unit_percent(&self, size: Size) -> Point
Returns the position in a range from 0.0 to 1.0
Trait Implementations§
Source§impl Clone for OnPlanePos
impl Clone for OnPlanePos
Source§fn clone(&self) -> OnPlanePos
fn clone(&self) -> OnPlanePos
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OnPlanePos
Source§impl Debug for OnPlanePos
impl Debug for OnPlanePos
Source§impl Default for OnPlanePos
impl Default for OnPlanePos
Source§fn default() -> OnPlanePos
fn default() -> OnPlanePos
Returns the “default value” for a type. Read more
Source§impl PartialEq for OnPlanePos
impl PartialEq for OnPlanePos
Source§impl PartialOrd for OnPlanePos
impl PartialOrd for OnPlanePos
impl StructuralPartialEq for OnPlanePos
Auto Trait Implementations§
impl Freeze for OnPlanePos
impl RefUnwindSafe for OnPlanePos
impl Send for OnPlanePos
impl Sync for OnPlanePos
impl Unpin for OnPlanePos
impl UnsafeUnpin for OnPlanePos
impl UnwindSafe for OnPlanePos
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more