pub enum Resolution {
DotsPerInch(Dpi),
DotsPerCentimeter(Dpcm),
DotsPerPixel(Dppx),
}Expand description
Variants§
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub const fn is_dots_per_inch(&self) -> bool
pub const fn is_dots_per_inch(&self) -> bool
Returns true if the enum is Resolution::DotsPerInch otherwise false
Sourcepub const fn is_dots_per_centimeter(&self) -> bool
pub const fn is_dots_per_centimeter(&self) -> bool
Returns true if the enum is Resolution::DotsPerCentimeter otherwise false
Sourcepub const fn is_dots_per_pixel(&self) -> bool
pub const fn is_dots_per_pixel(&self) -> bool
Returns true if the enum is Resolution::DotsPerPixel otherwise false
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Resolution
impl Debug for Resolution
Source§impl Display for Resolution
impl Display for Resolution
Source§impl DotsPerInchStorage for Resolution
impl DotsPerInchStorage for Resolution
Source§impl DotsPerPixelStorage for Resolution
impl DotsPerPixelStorage for Resolution
Source§impl From<Dpcm> for Resolution
impl From<Dpcm> for Resolution
Source§impl From<Dpi> for Resolution
impl From<Dpi> for Resolution
Source§impl From<Dppx> for Resolution
impl From<Dppx> for Resolution
Source§impl From<Resolution> for Dimension
impl From<Resolution> for Dimension
Source§fn from(value: Resolution) -> Self
fn from(value: Resolution) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnwindSafe for Resolution
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