#[repr(transparent)]pub struct DevicePixels(pub i32);Expand description
Physical pixels of a display: what a platform’s bitmaps, swap chains
and pointer events in pixels count. NSH’s own values are Points;
conversions happen at the platform boundary, with the surface’s scale
factor.
Tuple Fields§
§0: i32Implementations§
Trait Implementations§
Source§impl Add for DevicePixels
impl Add for DevicePixels
Source§type Output = DevicePixels
type Output = DevicePixels
The resulting type after applying the
+ operator.Source§fn add(self, rhs: DevicePixels) -> DevicePixels
fn add(self, rhs: DevicePixels) -> DevicePixels
Performs the
+ operation. Read moreSource§impl Clone for DevicePixels
impl Clone for DevicePixels
Source§fn clone(&self) -> DevicePixels
fn clone(&self) -> DevicePixels
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DevicePixels
Source§impl Debug for DevicePixels
impl Debug for DevicePixels
Source§impl Default for DevicePixels
impl Default for DevicePixels
Source§fn default() -> DevicePixels
fn default() -> DevicePixels
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DevicePixels
impl<'de> Deserialize<'de> for DevicePixels
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DevicePixels, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DevicePixels, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DevicePixels
Source§impl From<i32> for DevicePixels
impl From<i32> for DevicePixels
Source§fn from(v: i32) -> DevicePixels
fn from(v: i32) -> DevicePixels
Converts to this type from the input type.
Source§impl Half for DevicePixels
impl Half for DevicePixels
Source§fn half(&self) -> DevicePixels
fn half(&self) -> DevicePixels
Half the value.
Source§impl Hash for DevicePixels
impl Hash for DevicePixels
Source§impl JsValue for DevicePixels
A whole number of pixels (an image’s size).
impl JsValue for DevicePixels
A whole number of pixels (an image’s size).
Source§impl Ord for DevicePixels
impl Ord for DevicePixels
Source§fn cmp(&self, other: &DevicePixels) -> Ordering
fn cmp(&self, other: &DevicePixels) -> Ordering
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for DevicePixels
impl PartialEq for DevicePixels
Source§impl PartialOrd for DevicePixels
impl PartialOrd for DevicePixels
Source§impl Serialize for DevicePixels
impl Serialize for DevicePixels
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DevicePixels
Source§impl Sub for DevicePixels
impl Sub for DevicePixels
Source§type Output = DevicePixels
type Output = DevicePixels
The resulting type after applying the
- operator.Source§fn sub(self, rhs: DevicePixels) -> DevicePixels
fn sub(self, rhs: DevicePixels) -> DevicePixels
Performs the
- operation. Read moreAuto Trait Implementations§
impl Freeze for DevicePixels
impl RefUnwindSafe for DevicePixels
impl Send for DevicePixels
impl Sync for DevicePixels
impl Unpin for DevicePixels
impl UnsafeUnpin for DevicePixels
impl UnwindSafe for DevicePixels
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> CallbackArgs for Twhere
T: Ret,
impl<T> CallbackArgs for Twhere
T: Ret,
Source§fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
Its TypeScript parameters, named
names (name: string, amount: number), or without names value for one and a, b, … for
several.Source§fn into_js_args<'a>(
self,
host: &'a dyn JsHost,
) -> Result<Vec<JsOwned<'a>>, PropError>
fn into_js_args<'a>( self, host: &'a dyn JsHost, ) -> Result<Vec<JsOwned<'a>>, PropError>
The arguments as JS values.
fn classes(out: &mut Vec<&'static ClassDef>)
Source§impl<T> CallbackRet for Twhere
T: JsValue,
impl<T> CallbackRet for Twhere
T: JsValue,
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.