Struct winit::dpi::PhysicalSize [−][src]
pub struct PhysicalSize<P> { pub width: P, pub height: P, }
Expand description
A size represented in physical pixels.
Fields
width: P
height: P
Implementations
impl<P> PhysicalSize<P>
[src]
impl<P> PhysicalSize<P>
[src]impl<P: Pixel> PhysicalSize<P>
[src]
impl<P: Pixel> PhysicalSize<P>
[src]pub fn from_logical<T: Into<LogicalSize<X>>, X: Pixel>(
logical: T,
scale_factor: f64
) -> Self
[src]
logical: T,
scale_factor: f64
) -> Self
pub fn to_logical<X: Pixel>(&self, scale_factor: f64) -> LogicalSize<X>
[src]
pub fn cast<X: Pixel>(&self) -> PhysicalSize<X>
[src]
Trait Implementations
impl<P: Clone> Clone for PhysicalSize<P>
[src]
impl<P: Clone> Clone for PhysicalSize<P>
[src]fn clone(&self) -> PhysicalSize<P>
[src]
fn clone(&self) -> PhysicalSize<P>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<P: Debug> Debug for PhysicalSize<P>
[src]
impl<P: Debug> Debug for PhysicalSize<P>
[src]impl<P: Default> Default for PhysicalSize<P>
[src]
impl<P: Default> Default for PhysicalSize<P>
[src]fn default() -> PhysicalSize<P>
[src]
fn default() -> PhysicalSize<P>
[src]Returns the “default value” for a type. Read more
impl<'de, P> Deserialize<'de> for PhysicalSize<P> where
P: Deserialize<'de>,
[src]
impl<'de, P> Deserialize<'de> for PhysicalSize<P> where
P: Deserialize<'de>,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<P: Pixel, X: Pixel> From<[X; 2]> for PhysicalSize<P>
[src]
impl<P: Pixel, X: Pixel> From<[X; 2]> for PhysicalSize<P>
[src]fn from([x, y]: [X; 2]) -> PhysicalSize<P>
[src]
fn from([x, y]: [X; 2]) -> PhysicalSize<P>
[src]Performs the conversion.
impl<P: Pixel, X: Pixel> From<(X, X)> for PhysicalSize<P>
[src]
impl<P: Pixel, X: Pixel> From<(X, X)> for PhysicalSize<P>
[src]fn from((x, y): (X, X)) -> PhysicalSize<P>
[src]
fn from((x, y): (X, X)) -> PhysicalSize<P>
[src]Performs the conversion.
impl<P: Pixel> From<PhysicalSize<P>> for Size
[src]
impl<P: Pixel> From<PhysicalSize<P>> for Size
[src]fn from(size: PhysicalSize<P>) -> Size
[src]
fn from(size: PhysicalSize<P>) -> Size
[src]Performs the conversion.
impl<P: Hash> Hash for PhysicalSize<P>
[src]
impl<P: Hash> Hash for PhysicalSize<P>
[src]impl<P: PartialEq> PartialEq<PhysicalSize<P>> for PhysicalSize<P>
[src]
impl<P: PartialEq> PartialEq<PhysicalSize<P>> for PhysicalSize<P>
[src]fn eq(&self, other: &PhysicalSize<P>) -> bool
[src]
fn eq(&self, other: &PhysicalSize<P>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &PhysicalSize<P>) -> bool
[src]
fn ne(&self, other: &PhysicalSize<P>) -> bool
[src]This method tests for !=
.
impl<P> Serialize for PhysicalSize<P> where
P: Serialize,
[src]
impl<P> Serialize for PhysicalSize<P> where
P: Serialize,
[src]impl<P: Copy> Copy for PhysicalSize<P>
[src]
impl<P: Eq> Eq for PhysicalSize<P>
[src]
impl<P> StructuralEq for PhysicalSize<P>
[src]
impl<P> StructuralPartialEq for PhysicalSize<P>
[src]
Auto Trait Implementations
impl<P> RefUnwindSafe for PhysicalSize<P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
impl<P> Send for PhysicalSize<P> where
P: Send,
P: Send,
impl<P> Sync for PhysicalSize<P> where
P: Sync,
P: Sync,
impl<P> Unpin for PhysicalSize<P> where
P: Unpin,
P: Unpin,
impl<P> UnwindSafe for PhysicalSize<P> where
P: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,