Struct AspectRatio
pub struct AspectRatio { /* private fields */ }Implementations§
§impl AspectRatio
impl AspectRatio
pub fn new(width: u32, height: u32) -> Result<AspectRatio, AspectRatioError>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn ratio(&self) -> f64
pub fn simplified(&self) -> AspectRatio
pub fn label(&self) -> String
Trait Implementations§
§impl Clone for AspectRatio
impl Clone for AspectRatio
§fn clone(&self) -> AspectRatio
fn clone(&self) -> AspectRatio
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 more§impl Debug for AspectRatio
impl Debug for AspectRatio
§impl PartialEq for AspectRatio
impl PartialEq for AspectRatio
impl Copy for AspectRatio
impl Eq for AspectRatio
impl StructuralPartialEq for AspectRatio
Auto Trait Implementations§
impl Freeze for AspectRatio
impl RefUnwindSafe for AspectRatio
impl Send for AspectRatio
impl Sync for AspectRatio
impl Unpin for AspectRatio
impl UnsafeUnpin for AspectRatio
impl UnwindSafe for AspectRatio
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