pub struct Point<T> {
pub x: T,
pub y: T,
}
Expand description
A 2-dimensional coordinate.
When used in association with a Rect
, represents the bottom-left corner.
Fields§
§x: T
The x-coordinate
y: T
The y-coordinate
Implementations§
source§impl<T: TaffyMinContent> Point<T>
impl<T: TaffyMinContent> Point<T>
sourcepub const fn min_content() -> Self
pub const fn min_content() -> Self
Returns a Point where both the x and y values are the min_content value of the contained type (e.g. Dimension::Auto or LengthPercentageAuto::Auto)
source§impl<T: TaffyMaxContent> Point<T>
impl<T: TaffyMaxContent> Point<T>
sourcepub const fn max_content() -> Self
pub const fn max_content() -> Self
Returns a Point where both the x and y values are the max_content value of the contained type (e.g. Dimension::Auto or LengthPercentageAuto::Auto)
source§impl<T: TaffyFitContent> Point<T>
impl<T: TaffyFitContent> Point<T>
sourcepub fn fit_content(argument: LengthPercentage) -> Self
pub fn fit_content(argument: LengthPercentage) -> Self
Returns a Point where both the x and y values are the constant points value of the contained type (e.g. 2.1, Some(2.1), or Dimension::Points(2.1))
source§impl<T: FromPoints> Point<T>
impl<T: FromPoints> Point<T>
Trait Implementations§
source§impl<T: FromPercent> FromPercent for Point<T>
impl<T: FromPercent> FromPercent for Point<T>
source§impl<T: FromPoints> FromPoints for Point<T>
impl<T: FromPoints> FromPoints for Point<T>
source§impl<T: PartialEq> PartialEq for Point<T>
impl<T: PartialEq> PartialEq for Point<T>
source§impl<T: TaffyFitContent> TaffyFitContent for Point<T>
impl<T: TaffyFitContent> TaffyFitContent for Point<T>
source§fn fit_content(argument: LengthPercentage) -> Self
fn fit_content(argument: LengthPercentage) -> Self
Converts into a LengthPercentage into Self
source§impl<T: TaffyMaxContent> TaffyMaxContent for Point<T>
impl<T: TaffyMaxContent> TaffyMaxContent for Point<T>
source§const MAX_CONTENT: Point<T> = _
const MAX_CONTENT: Point<T> = _
The max_content value for type implementing TaffyZero
source§impl<T: TaffyMinContent> TaffyMinContent for Point<T>
impl<T: TaffyMinContent> TaffyMinContent for Point<T>
source§const MIN_CONTENT: Point<T> = _
const MIN_CONTENT: Point<T> = _
The min_content value for type implementing TaffyZero
impl<T: Copy> Copy for Point<T>
impl<T: Eq> Eq for Point<T>
impl<T> StructuralEq for Point<T>
impl<T> StructuralPartialEq for Point<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Point<T>where
T: RefUnwindSafe,
impl<T> Send for Point<T>where
T: Send,
impl<T> Sync for Point<T>where
T: Sync,
impl<T> Unpin for Point<T>where
T: Unpin,
impl<T> UnwindSafe for Point<T>where
T: UnwindSafe,
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