pub enum Rotation {
_0,
_90,
_180,
_270,
}Expand description
Counter-clockwise rotation
Variants§
Implementations§
Trait Implementations§
Source§impl TryFrom<f64> for Rotation
Get rotation from multiples of 90 deg
impl TryFrom<f64> for Rotation
Get rotation from multiples of 90 deg
The given value is rounded to an integer number
assert_eq!(Rotation::try_from(90.).unwrap(), Rotation::_90);
assert_eq!(Rotation::try_from(-90.).unwrap(), Rotation::_270);
assert!(Rotation::try_from(1.).is_err());impl Copy for Rotation
impl Eq for Rotation
impl StructuralPartialEq for Rotation
Auto Trait Implementations§
impl Freeze for Rotation
impl RefUnwindSafe for Rotation
impl Send for Rotation
impl Sync for Rotation
impl Unpin for Rotation
impl UnwindSafe for Rotation
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