Struct taffy::compute::grid::types::coordinates::OriginZeroLine
source · #[repr(transparent)]pub struct OriginZeroLine(pub i16);
Expand description
Represents a grid line position in “OriginZero” coordinates
“OriginZero” coordinates are a normalized form:
- The line at left hand (or top) edge of the explicit grid is line 0
- The next line to the right (or down) is 1, and so on
- The next line to the left (or up) is -1, and so on
Tuple Fields§
§0: i16
Implementations§
source§impl OriginZeroLine
impl OriginZeroLine
sourcepub(crate) fn into_track_vec_index(self, track_counts: TrackCounts) -> usize
pub(crate) fn into_track_vec_index(self, track_counts: TrackCounts) -> usize
Converts a grid line in OriginZero coordinates into the index of that same grid line in the GridTrackVec.
sourcepub(crate) fn implied_negative_implicit_tracks(self) -> u16
pub(crate) fn implied_negative_implicit_tracks(self) -> u16
The minimum number of negative implicit track there must be if a grid item starts at this line.
sourcepub(crate) fn implied_positive_implicit_tracks(
self,
explicit_track_count: u16,
) -> u16
pub(crate) fn implied_positive_implicit_tracks( self, explicit_track_count: u16, ) -> u16
The minimum number of positive implicit track there must be if a grid item end at this line.
Trait Implementations§
source§impl Add<u16> for OriginZeroLine
impl Add<u16> for OriginZeroLine
source§impl Add for OriginZeroLine
impl Add for OriginZeroLine
source§type Output = OriginZeroLine
type Output = OriginZeroLine
The resulting type after applying the
+
operator.source§impl AddAssign<u16> for OriginZeroLine
impl AddAssign<u16> for OriginZeroLine
source§fn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
Performs the
+=
operation. Read moresource§impl Clone for OriginZeroLine
impl Clone for OriginZeroLine
source§fn clone(&self) -> OriginZeroLine
fn clone(&self) -> OriginZeroLine
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OriginZeroLine
impl Debug for OriginZeroLine
source§impl Ord for OriginZeroLine
impl Ord for OriginZeroLine
source§fn cmp(&self, other: &OriginZeroLine) -> Ordering
fn cmp(&self, other: &OriginZeroLine) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for OriginZeroLine
impl PartialEq for OriginZeroLine
source§impl PartialOrd for OriginZeroLine
impl PartialOrd for OriginZeroLine
source§impl Sub<u16> for OriginZeroLine
impl Sub<u16> for OriginZeroLine
source§impl Sub for OriginZeroLine
impl Sub for OriginZeroLine
source§type Output = OriginZeroLine
type Output = OriginZeroLine
The resulting type after applying the
-
operator.impl Copy for OriginZeroLine
impl Eq for OriginZeroLine
impl GridCoordinate for OriginZeroLine
impl StructuralPartialEq for OriginZeroLine
Auto Trait Implementations§
impl Freeze for OriginZeroLine
impl RefUnwindSafe for OriginZeroLine
impl Send for OriginZeroLine
impl Sync for OriginZeroLine
impl Unpin for OriginZeroLine
impl UnwindSafe for OriginZeroLine
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)