Struct figures::units::Lp

source ·
#[repr(C)]
pub struct Lp(/* private fields */);
Expand description

Logical pixels, a device-independent measurement

A logical pixel is equivalent to a single pixel on a 96-DPI display. However, this unit is scaled when converiting to Px to honor the target display’s actual DPI.

For example, consider these assertions:

use figures::units::{Lp, Px};
use figures::{Fraction, ScreenScale};

// Scaling factor of 1.0
assert_eq!(Lp::new(1).into_px(Fraction::new_whole(1)), Px::new(1));

// Scaling factor of 2.0
assert_eq!(Lp::new(1).into_px(Fraction::new_whole(2)), Px::new(2));

// Scaling factor of 0.5
assert_eq!(Lp::new(1).into_px(Fraction::new(1, 2)), Px::from(0.5));

Logical pixels are designed around several use cases. Internally, this type uses integers to represent logical pixels, which ensures that math is always predictable, and any precision loss is controllable by the developer.

To ensure that the Lp type has as little precision loss as possible, it uses a scale of 1,905 subpixels . This number may seem arbitrary, but it is a multiple of the prime numbers 3, 5, and 127. These numbers are important because:

  • 72: Typographic points are defined as 72 points per inch, and the prime factorization is 2^3 * 3^2.
  • 96: A scaling factor of 1 is defined as 96 pixels per inchm, and the prime factorization is 2^5 * 3.
  • 254: Allows using metric units lossleslly because 2.54cm = 1in, and it’s prime factorization is 2 * 127
  • 5: Five is a low common prime, and everyone likes round numbers.

Because the Lp scale is arbitrary and hard to reason about, this type has many constructors to allow specifying measurements in various units developers will be more comfortable with:

use figures::units::Lp;

// Centimeters
assert_eq!(Lp::cm_f(1.), Lp::cm(1));
// Millimeters
assert_eq!(Lp::mm_f(1.), Lp::mm(1));
assert_eq!(Lp::mm(10), Lp::cm(1));

// Inches
assert_eq!(Lp::inches_f(1.), Lp::inches(1));
assert_eq!(Lp::inches(1), Lp::cm_f(2.54));

// Points
assert_eq!(Lp::points_f(36.), Lp::points(36));
assert_eq!(Lp::points(36), Lp::inches_f(0.5));

Implementations§

source§

impl Lp

source

pub const MAX: Self = _

The maximum value for this type.

source

pub const MIN: Self = _

The minimum value for this type.

source

pub const fn new(value: i32) -> Self

Returns a new wrapped value for this unit.

source

pub const fn get(self) -> i32

Returns the contained value, rounded if applicable.

source

pub const fn saturating_sub(self, other: Self) -> Self

Returns the result of subtracting other from self. If the calculation overflows, the value will be limited to Self::MIN/Self::MAX.

source

pub const fn saturating_add(self, other: Self) -> Self

Returns the result of adding self and other. If the calculation overflows, the value will be limited to Self::MIN/Self::MAX.

source

pub const fn saturating_mul(self, other: Self) -> Self

Returns the result of multiplying self and other. If the calculation overflows, the value will be limited to Self::MIN/Self::MAX.

source

pub const fn saturating_div(self, other: Self) -> Self

Returns the result of dividing self by other. If the calculation overflows, the value will be limited to Self::MIN/Self::MAX.

source§

impl Lp

source

pub const fn points(points: i32) -> Self

Returns a value equivalent to the number of points provided. One point is 1/72 of an inch.

source

pub fn points_f(points: f32) -> Self

Returns a value equivalent to the number of points provided. One point is 1/72 of an inch.

source

pub const fn cm(centimeters: i32) -> Self

Returns a value equivalent to the number of centimeters provided.

source

pub fn cm_f(centimeters: f32) -> Self

Returns a value equivalent to the number of centimeters provided.

source

pub const fn mm(millimeters: i32) -> Self

Returns a value equivalent to the number of millimeters provided.

source

pub fn mm_f(millimeters: f32) -> Self

Returns a value equivalent to the number of millimeters provided.

source

pub const fn inches(inches: i32) -> Self

Returns a value equivalent to the number of inches provided.

source

pub fn inches_f(inches: f32) -> Self

Returns a value equivalent to the number of inches provided.

Trait Implementations§

source§

impl Abs for Lp

source§

fn abs(&self) -> Self

Returns the positive difference between this value and 0. Read more
source§

impl<Unit> Add<Lp> for Point<Unit>
where Unit: Add<Lp, Output = Unit>,

§

type Output = Point<Unit>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Lp) -> Self::Output

Performs the + operation. Read more
source§

impl<Unit> Add<Lp> for Size<Unit>
where Unit: Add<Lp, Output = Unit>,

§

type Output = Size<Unit>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Lp) -> Self::Output

Performs the + operation. Read more
source§

impl Add<i32> for Lp

§

type Output = Lp

The resulting type after applying the + operator.
source§

fn add(self, rhs: i32) -> Self::Output

Performs the + operation. Read more
source§

impl Add for Lp

§

type Output = Lp

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign<i32> for Lp

source§

fn add_assign(&mut self, rhs: i32)

Performs the += operation. Read more
source§

impl AddAssign for Lp

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl Clone for Lp

source§

fn clone(&self) -> Lp

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Lp

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Lp

source§

fn default() -> Lp

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Lp

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Lp

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Div<Fraction> for Lp

§

type Output = Lp

The resulting type after applying the / operator.
source§

fn div(self, rhs: Fraction) -> Self::Output

Performs the / operation. Read more
source§

impl<Unit> Div<Lp> for Point<Unit>
where Unit: Div<Lp, Output = Unit>,

§

type Output = Point<Unit>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Lp) -> Self::Output

Performs the / operation. Read more
source§

impl<Unit> Div<Lp> for Size<Unit>
where Unit: Div<Lp, Output = Unit>,

§

type Output = Size<Unit>

The resulting type after applying the / operator.
source§

fn div(self, rhs: Lp) -> Self::Output

Performs the / operation. Read more
source§

impl Div<f32> for Lp

§

type Output = Lp

The resulting type after applying the / operator.
source§

fn div(self, rhs: f32) -> Self::Output

Performs the / operation. Read more
source§

impl Div<i32> for Lp

§

type Output = Lp

The resulting type after applying the / operator.
source§

fn div(self, rhs: i32) -> Self::Output

Performs the / operation. Read more
source§

impl Div for Lp

§

type Output = Lp

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl DivAssign<i32> for Lp

source§

fn div_assign(&mut self, rhs: i32)

Performs the /= operation. Read more
source§

impl DivAssign for Lp

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl FloatConversion for Lp

§

type Float = f32

The type that represents this type in floating point form.
source§

fn into_float(self) -> Self::Float

Returns this value in floating point form.
source§

fn from_float(float: Self::Float) -> Self

Converts from floating point to this form.
source§

impl From<Lp> for f32

source§

fn from(value: Lp) -> Self

Converts to this type from the input type.
source§

impl From<Lp> for i32

source§

fn from(value: Lp) -> Self

Converts to this type from the input type.
source§

impl From<f32> for Lp

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Lp

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl Hash for Lp

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntoComponents<Lp> for f32

source§

fn into_components(self) -> (Lp, Lp)

Extracts this type’s 2d vector components.
source§

fn to_vec<Type>(self) -> Type
where Type: FromComponents<Unit>,

Converts this type to another type using FromComponents and IntoComponents.
source§

impl IntoComponents<Lp> for i32

source§

fn into_components(self) -> (Lp, Lp)

Extracts this type’s 2d vector components.
source§

fn to_vec<Type>(self) -> Type
where Type: FromComponents<Unit>,

Converts this type to another type using FromComponents and IntoComponents.
source§

impl IntoSigned for Lp

§

type Signed = Lp

The signed representation of this type.
source§

fn into_signed(self) -> Self::Signed

Returns this value as an unsigned value. Values that are larger than can fit in an i32 are converted to i32::MAX.
source§

impl Mul<Fraction> for Lp

§

type Output = Lp

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Fraction) -> Self::Output

Performs the * operation. Read more
source§

impl<Unit> Mul<Lp> for Point<Unit>
where Unit: Mul<Lp, Output = Unit>,

§

type Output = Point<Unit>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Lp) -> Self::Output

Performs the * operation. Read more
source§

impl<Unit> Mul<Lp> for Size<Unit>
where Unit: Mul<Lp, Output = Unit>,

§

type Output = Size<Unit>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Lp) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<f32> for Lp

§

type Output = Lp

The resulting type after applying the * operator.
source§

fn mul(self, rhs: f32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<i32> for Lp

§

type Output = Lp

The resulting type after applying the * operator.
source§

fn mul(self, rhs: i32) -> Self::Output

Performs the * operation. Read more
source§

impl Mul for Lp

§

type Output = Lp

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl MulAssign<i32> for Lp

source§

fn mul_assign(&mut self, rhs: i32)

Performs the *= operation. Read more
source§

impl MulAssign for Lp

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl Neg for Lp

§

type Output = Lp

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl Ord for Lp

source§

fn cmp(&self, other: &Lp) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<i32> for Lp

source§

fn eq(&self, other: &i32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Lp

source§

fn eq(&self, other: &Lp) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<i32> for Lp

source§

fn partial_cmp(&self, other: &i32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd for Lp

source§

fn partial_cmp(&self, other: &Lp) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PixelScaling for Lp

source§

const PX_SCALING_FACTOR: u16 = 1_905u16

The scaling factor to apply when converting to pixels, in addition to any spatial scaling already being applied.
source§

impl Pow for Lp

source§

fn pow(&self, exp: u32) -> Self

Returns the saturating result of raising self to the exp power.
source§

impl Ranged for Lp

source§

const MAX: Self = Lp::MAX

The maximum value for this type.
source§

const MIN: Self = Lp::MIN

The minimum value for this type.
source§

impl<Unit> Rem<Lp> for Point<Unit>
where Unit: Rem<Lp, Output = Unit>,

§

type Output = Point<Unit>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Lp) -> Self::Output

Performs the % operation. Read more
source§

impl<Unit> Rem<Lp> for Size<Unit>
where Unit: Rem<Lp, Output = Unit>,

§

type Output = Size<Unit>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Lp) -> Self::Output

Performs the % operation. Read more
source§

impl Rem<f32> for Lp

§

type Output = Lp

The resulting type after applying the % operator.
source§

fn rem(self, rhs: f32) -> Self::Output

Performs the % operation. Read more
source§

impl Rem<i32> for Lp

§

type Output = Lp

The resulting type after applying the % operator.
source§

fn rem(self, rhs: i32) -> Self::Output

Performs the % operation. Read more
source§

impl Rem for Lp

§

type Output = Lp

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl RemAssign<i32> for Lp

source§

fn rem_assign(&mut self, rhs: i32)

Performs the %= operation. Read more
source§

impl RemAssign for Lp

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl Roots for Lp

source§

fn sqrt(self) -> Self

Returns the square root of self.
source§

fn cbrt(self) -> Self

Returns the cube root of self.
source§

impl Round for Lp

source§

fn round(self) -> Self

Returns self rounded to the nearest whole number.
source§

fn ceil(self) -> Self

Returns self raised to the next whole number further away from 0.
source§

fn floor(self) -> Self

Returns self lowered to the next whole number closer to 0.
source§

impl ScreenScale for Lp

§

type Lp = Lp

This type when measuring with Lp.
§

type Px = Px

This type when measuring with Px.
§

type UPx = UPx

This type when measuring with UPx.
source§

fn into_px(self, scale: Fraction) -> Self::Px

Converts this value from its current unit into device pixels (Px) using the provided scale factor.
source§

fn from_px(px: Self::Px, scale: Fraction) -> Self

Converts from pixels into this type, using the provided scale factor.
source§

fn into_lp(self, _scale: Fraction) -> Self::Lp

Converts this value from its current unit into device independent pixels (Lp) using the provided scale factor.
source§

fn from_lp(lp: Self::Lp, _scale: Fraction) -> Self

Converts from Lp into this type, using the provided scale factor.
source§

fn into_upx(self, scale: Fraction) -> Self::UPx

Converts this value from its current unit into device pixels (UPx) using the provided scale factor.
source§

fn from_upx(px: Self::UPx, scale: Fraction) -> Self

Converts from unsigned pixels into this type, using the provided scale factor.
source§

impl Serialize for Lp

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Unit> Sub<Lp> for Point<Unit>
where Unit: Sub<Lp, Output = Unit>,

§

type Output = Point<Unit>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Lp) -> Self::Output

Performs the - operation. Read more
source§

impl<Unit> Sub<Lp> for Size<Unit>
where Unit: Sub<Lp, Output = Unit>,

§

type Output = Size<Unit>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Lp) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<i32> for Lp

§

type Output = Lp

The resulting type after applying the - operator.
source§

fn sub(self, rhs: i32) -> Self::Output

Performs the - operation. Read more
source§

impl Sub for Lp

§

type Output = Lp

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl SubAssign<i32> for Lp

source§

fn sub_assign(&mut self, rhs: i32)

Performs the -= operation. Read more
source§

impl SubAssign for Lp

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl TryFrom<u32> for Lp

§

type Error = TryFromIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl UnscaledUnit for Lp

§

type Representation = i32

The internal reprsentation used by this type.
source§

fn from_unscaled(unscaled: Self::Representation) -> Self

Returns a new instance using the unscaled representation.
source§

fn into_unscaled(self) -> Self::Representation

Returns the inner, unscaled representation of this value.
source§

impl Zero for Lp

source§

const ZERO: Self = _

The zero value for this type.
source§

fn is_zero(&self) -> bool

Returns true if self represents 0.
source§

impl Zeroable for Lp

§

fn zeroed() -> Self

source§

impl Copy for Lp

source§

impl Eq for Lp

source§

impl Pod for Lp

source§

impl StructuralPartialEq for Lp

Auto Trait Implementations§

§

impl Freeze for Lp

§

impl RefUnwindSafe for Lp

§

impl Send for Lp

§

impl Sync for Lp

§

impl Unpin for Lp

§

impl UnwindSafe for Lp

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<A> Cast for A

§

fn cast<To>(self) -> To
where To: CastFrom<A>,

Casts self to the To type. This may be a lossy operation.
§

impl<A> CastFrom<A> for A

§

fn from_cast(from: A) -> A

Returns from as Self.
§

impl<A, B> CastInto<A> for B
where A: CastFrom<B>,

§

fn cast_into(self) -> A

Returns self as To.
§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Unit> IntoComponents<Unit> for Unit
where Unit: Copy,

source§

fn into_components(self) -> (Unit, Unit)

Extracts this type’s 2d vector components.
source§

fn to_vec<Type>(self) -> Type
where Type: FromComponents<Unit>,

Converts this type to another type using FromComponents and IntoComponents.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> AnyBitPattern for T
where T: Pod,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> NoUninit for T
where T: Pod,

source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

source§

impl<T> ScreenUnit for T
where T: UnscaledUnit + ScreenScale<Px = Px, Lp = Lp, UPx = UPx> + Unit,

source§

impl<T> Unit for T
where T: Div<Output = T> + Add<Output = T> + Mul<Output = T> + FloatConversion<Float = f32> + Rem<Output = T> + Sub<Output = T> + AddAssign + SubAssign + DivAssign + MulAssign + RemAssign + Zero + Ord + Eq + Copy + Default + Debug + IntoSigned + TryInto<i32> + 'static,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,