#[repr(C)]pub struct UPx(/* private fields */);
Expand description
Unsigned Physical pixels
Implementations§
source§impl UPx
impl UPx
sourcepub const fn saturating_sub(self, other: Self) -> Self
pub const fn saturating_sub(self, other: Self) -> Self
sourcepub const fn saturating_add(self, other: Self) -> Self
pub const fn saturating_add(self, other: Self) -> Self
sourcepub const fn saturating_mul(self, other: Self) -> Self
pub const fn saturating_mul(self, other: Self) -> Self
sourcepub const fn saturating_div(self, other: Self) -> Self
pub const fn saturating_div(self, other: Self) -> Self
Trait Implementations§
source§impl AddAssign<u32> for UPx
impl AddAssign<u32> for UPx
source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+=
operation. Read moresource§impl AddAssign for UPx
impl AddAssign for UPx
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl<'de> Deserialize<'de> for UPx
impl<'de> Deserialize<'de> for UPx
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 DivAssign<u32> for UPx
impl DivAssign<u32> for UPx
source§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the
/=
operation. Read moresource§impl DivAssign for UPx
impl DivAssign for UPx
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl FloatConversion for UPx
impl FloatConversion for UPx
source§impl IntoComponents<UPx> for f32
impl IntoComponents<UPx> for f32
source§fn into_components(self) -> (UPx, UPx)
fn into_components(self) -> (UPx, UPx)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.source§impl IntoComponents<UPx> for u32
impl IntoComponents<UPx> for u32
source§fn into_components(self) -> (UPx, UPx)
fn into_components(self) -> (UPx, UPx)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.source§impl IntoSigned for UPx
impl IntoSigned for UPx
source§impl IntoUnsigned for UPx
impl IntoUnsigned for UPx
source§impl MulAssign<u32> for UPx
impl MulAssign<u32> for UPx
source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*=
operation. Read moresource§impl MulAssign for UPx
impl MulAssign for UPx
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl Ord for UPx
impl Ord for UPx
source§impl PartialOrd<Px> for UPx
impl PartialOrd<Px> for UPx
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl PartialOrd<UPx> for Px
impl PartialOrd<UPx> for Px
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl PartialOrd<u32> for UPx
impl PartialOrd<u32> for UPx
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl PartialOrd for UPx
impl PartialOrd for UPx
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl PixelScaling for UPx
impl PixelScaling for UPx
source§const PX_SCALING_FACTOR: u16 = 1u16
const PX_SCALING_FACTOR: u16 = 1u16
The scaling factor to apply when converting to pixels, in addition to
any spatial scaling already being applied.
source§impl RemAssign<u32> for UPx
impl RemAssign<u32> for UPx
source§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
Performs the
%=
operation. Read moresource§impl RemAssign for UPx
impl RemAssign for UPx
source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moresource§impl ScreenScale for UPx
impl ScreenScale for UPx
source§fn into_px(self, _scale: Fraction) -> Self::Px
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
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
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
fn from_lp(lp: Self::Lp, scale: Fraction) -> Self
Converts from Lp into this type, using the provided
scale
factor.source§impl SubAssign<u32> for UPx
impl SubAssign<u32> for UPx
source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-=
operation. Read moresource§impl SubAssign for UPx
impl SubAssign for UPx
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moresource§impl UnscaledUnit for UPx
impl UnscaledUnit for UPx
§type Representation = u32
type Representation = u32
The internal reprsentation used by this type.
source§fn from_unscaled(unscaled: Self::Representation) -> Self
fn from_unscaled(unscaled: Self::Representation) -> Self
Returns a new instance using the unscaled representation.
source§fn into_unscaled(self) -> Self::Representation
fn into_unscaled(self) -> Self::Representation
Returns the inner, unscaled representation of this value.
impl Copy for UPx
impl Eq for UPx
impl Pod for UPx
impl StructuralEq for UPx
impl StructuralPartialEq for UPx
Auto Trait Implementations§
impl RefUnwindSafe for UPx
impl Send for UPx
impl Sync for UPx
impl Unpin for UPx
impl UnwindSafe for UPx
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
§impl<A> Cast for A
impl<A> Cast for A
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere T: AnyBitPattern,
§type Bits = T
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
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> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
impl<Unit> IntoComponents<Unit> for Unitwhere Unit: Copy,
source§fn into_components(self) -> (Unit, Unit)
fn into_components(self) -> (Unit, Unit)
Extracts this type’s 2d vector components.
source§fn to_vec<Type>(self) -> Typewhere
Type: FromComponents<Unit>,
fn to_vec<Type>(self) -> Typewhere Type: FromComponents<Unit>,
Converts this type to another type using
FromComponents
and
IntoComponents
.