pub trait Coordinates: CubeType + Clone {
    // Required methods
    fn add(this: Self, other: Self) -> Self;
    fn sub(this: Self, other: Self) -> Self;
    fn min(this: Self, other: Self) -> Self;
    fn max(this: Self, other: Self) -> Self;
    fn is_in_bounds(pos: &Self, bounds: &Self) -> bool;
    fn from_int(this: &Self, value: i64) -> Self;
    fn __expand_add(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        other: <Self as CubeType>::ExpandType,
    ) -> <Self as CubeType>::ExpandType;
    fn __expand_sub(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        other: <Self as CubeType>::ExpandType,
    ) -> <Self as CubeType>::ExpandType;
    fn __expand_min(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        other: <Self as CubeType>::ExpandType,
    ) -> <Self as CubeType>::ExpandType;
    fn __expand_max(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        other: <Self as CubeType>::ExpandType,
    ) -> <Self as CubeType>::ExpandType;
    fn __expand_is_in_bounds(
        scope: &mut Scope,
        pos: <Self as CubeType>::ExpandType,
        bounds: <Self as CubeType>::ExpandType,
    ) -> <bool as CubeType>::ExpandType;
    fn __expand_from_int(
        scope: &mut Scope,
        this: <Self as CubeType>::ExpandType,
        value: i64,
    ) -> <Self as CubeType>::ExpandType;
}Expand description
A set of coordinates used in layouts. Contains some utilities for comptime inspection.
Required Methods§
Sourcefn sub(this: Self, other: Self) -> Self
 
fn sub(this: Self, other: Self) -> Self
Subtract two coordinates from each other and return the result.
Sourcefn min(this: Self, other: Self) -> Self
 
fn min(this: Self, other: Self) -> Self
Apply an elementwise minimum to the coordinates and return the result.
Sourcefn max(this: Self, other: Self) -> Self
 
fn max(this: Self, other: Self) -> Self
Apply an elementwise maximum to the coordinates and return the result.
Sourcefn is_in_bounds(pos: &Self, bounds: &Self) -> bool
 
fn is_in_bounds(pos: &Self, bounds: &Self) -> bool
Check whether pos is fully contained within bounds.
Sourcefn from_int(this: &Self, value: i64) -> Self
 
fn from_int(this: &Self, value: i64) -> Self
Create a new coordinates object where all values are value.
this may be used as a reference coordinate for dynamically sized layouts.
fn __expand_add( scope: &mut Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
fn __expand_sub( scope: &mut Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
fn __expand_min( scope: &mut Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
fn __expand_max( scope: &mut Scope, this: <Self as CubeType>::ExpandType, other: <Self as CubeType>::ExpandType, ) -> <Self as CubeType>::ExpandType
fn __expand_is_in_bounds( scope: &mut Scope, pos: <Self as CubeType>::ExpandType, bounds: <Self as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
fn __expand_from_int( scope: &mut Scope, this: <Self as CubeType>::ExpandType, value: i64, ) -> <Self as CubeType>::ExpandType
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.