Enum components::winit::dpi::Size
[−]pub enum Size {
Physical(PhysicalSize<u32>),
Logical(LogicalSize<f64>),
}
Expand description
A size that’s either physical or logical.
Variants
Physical(PhysicalSize<u32>)
Logical(LogicalSize<f64>)
Implementations
impl Size
impl Size
pub fn new<S>(size: S) -> Size where
S: Into<Size>,
pub fn to_logical<P>(&self, scale_factor: f64) -> LogicalSize<P> where
P: Pixel,
pub fn to_physical<P>(&self, scale_factor: f64) -> PhysicalSize<P> where
P: Pixel,
Trait Implementations
impl<P> From<LogicalSize<P>> for Size where
P: Pixel,
impl<P> From<LogicalSize<P>> for Size where
P: Pixel,
fn from(size: LogicalSize<P>) -> Size
fn from(size: LogicalSize<P>) -> Size
Converts to this type from the input type.
impl<P> From<PhysicalSize<P>> for Size where
P: Pixel,
impl<P> From<PhysicalSize<P>> for Size where
P: Pixel,
fn from(size: PhysicalSize<P>) -> Size
fn from(size: PhysicalSize<P>) -> Size
Converts to this type from the input type.
impl Copy for Size
impl StructuralPartialEq for Size
Auto Trait Implementations
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.