pub enum Position {
Physical(PhysicalPosition<i32>),
Logical(LogicalPosition<f64>),
}
Expand description
A position that’s either physical or logical.
Variants§
Physical(PhysicalPosition<i32>)
Logical(LogicalPosition<f64>)
Implementations§
Source§impl Position
impl Position
pub fn new<S>(position: S) -> Position
pub fn to_logical<P>(&self, scale_factor: f64) -> LogicalPosition<P>where
P: Pixel,
pub fn to_physical<P>(&self, scale_factor: f64) -> PhysicalPosition<P>where
P: Pixel,
Trait Implementations§
Source§impl<P> From<LogicalPosition<P>> for Positionwhere
P: Pixel,
impl<P> From<LogicalPosition<P>> for Positionwhere
P: Pixel,
Source§fn from(position: LogicalPosition<P>) -> Position
fn from(position: LogicalPosition<P>) -> Position
Converts to this type from the input type.
Source§impl<P> From<PhysicalPosition<P>> for Positionwhere
P: Pixel,
impl<P> From<PhysicalPosition<P>> for Positionwhere
P: Pixel,
Source§fn from(position: PhysicalPosition<P>) -> Position
fn from(position: PhysicalPosition<P>) -> Position
Converts to this type from the input type.
impl Copy for Position
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnwindSafe for Position
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