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> Point<T>where
T: TaffyMinContent,
impl<T> Point<T>where
T: TaffyMinContent,
sourcepub const fn min_content() -> Point<T>
pub const fn min_content() -> Point<T>
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> Point<T>where
T: TaffyMaxContent,
impl<T> Point<T>where
T: TaffyMaxContent,
sourcepub const fn max_content() -> Point<T>
pub const fn max_content() -> Point<T>
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> Point<T>where
T: TaffyFitContent,
impl<T> Point<T>where
T: TaffyFitContent,
sourcepub fn fit_content(argument: LengthPercentage) -> Point<T>
pub fn fit_content(argument: LengthPercentage) -> Point<T>
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> Point<T>where
T: FromPoints,
impl<T> Point<T>where
T: FromPoints,
Trait Implementations§
source§impl<T> FromPercent for Point<T>where
T: FromPercent,
impl<T> FromPercent for Point<T>where
T: FromPercent,
source§impl<T> FromPoints for Point<T>where
T: FromPoints,
impl<T> FromPoints for Point<T>where
T: FromPoints,
source§impl<T> PartialEq for Point<T>where
T: PartialEq,
impl<T> PartialEq for Point<T>where
T: PartialEq,
source§impl<T> TaffyFitContent for Point<T>where
T: TaffyFitContent,
impl<T> TaffyFitContent for Point<T>where
T: TaffyFitContent,
source§fn fit_content(argument: LengthPercentage) -> Point<T>
fn fit_content(argument: LengthPercentage) -> Point<T>
Converts into a LengthPercentage into Self
source§impl<T> TaffyMaxContent for Point<T>where
T: TaffyMaxContent,
impl<T> TaffyMaxContent for Point<T>where
T: TaffyMaxContent,
source§const MAX_CONTENT: Point<T> = _
const MAX_CONTENT: Point<T> = _
The max_content value for type implementing TaffyZero
source§impl<T> TaffyMinContent for Point<T>where
T: TaffyMinContent,
impl<T> TaffyMinContent for Point<T>where
T: TaffyMinContent,
source§const MIN_CONTENT: Point<T> = _
const MIN_CONTENT: Point<T> = _
The min_content value for type implementing TaffyZero
impl<T> Copy for Point<T>where
T: Copy,
impl<T> Eq for Point<T>where
T: Eq,
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more