pub struct PhysicalInsets<P> {
pub top: P,
pub left: P,
pub bottom: P,
pub right: P,
}
Expand description
The physical distance between the edges of two rectangles.
Fields§
§top: P
The distance to the top edge.
left: P
The distance to the left edge.
bottom: P
The distance to the bottom edge.
right: P
The distance to the right edge.
Implementations§
Source§impl<P> PhysicalInsets<P>
impl<P> PhysicalInsets<P>
Source§impl<P: Pixel> PhysicalInsets<P>
impl<P: Pixel> PhysicalInsets<P>
pub fn from_logical<T: Into<LogicalInsets<X>>, X: Pixel>( logical: T, scale_factor: f64, ) -> Self
pub fn to_logical<X: Pixel>(&self, scale_factor: f64) -> LogicalInsets<X>
pub fn cast<X: Pixel>(&self) -> PhysicalInsets<X>
Trait Implementations§
Source§impl<P: Clone> Clone for PhysicalInsets<P>
impl<P: Clone> Clone for PhysicalInsets<P>
Source§fn clone(&self) -> PhysicalInsets<P>
fn clone(&self) -> PhysicalInsets<P>
Returns a copy 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<P: Debug> Debug for PhysicalInsets<P>
impl<P: Debug> Debug for PhysicalInsets<P>
Source§impl<P: Default> Default for PhysicalInsets<P>
impl<P: Default> Default for PhysicalInsets<P>
Source§fn default() -> PhysicalInsets<P>
fn default() -> PhysicalInsets<P>
Returns the “default value” for a type. Read more
Source§impl<P: Pixel> From<PhysicalInsets<P>> for Insets
impl<P: Pixel> From<PhysicalInsets<P>> for Insets
Source§fn from(insets: PhysicalInsets<P>) -> Self
fn from(insets: PhysicalInsets<P>) -> Self
Converts to this type from the input type.
Source§impl<P: Hash> Hash for PhysicalInsets<P>
impl<P: Hash> Hash for PhysicalInsets<P>
Source§impl<P: Ord> Ord for PhysicalInsets<P>
impl<P: Ord> Ord for PhysicalInsets<P>
Source§fn cmp(&self, other: &PhysicalInsets<P>) -> Ordering
fn cmp(&self, other: &PhysicalInsets<P>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<P: PartialEq> PartialEq for PhysicalInsets<P>
impl<P: PartialEq> PartialEq for PhysicalInsets<P>
Source§impl<P: PartialOrd> PartialOrd for PhysicalInsets<P>
impl<P: PartialOrd> PartialOrd for PhysicalInsets<P>
impl<P: Copy> Copy for PhysicalInsets<P>
impl<P: Eq> Eq for PhysicalInsets<P>
impl<P> StructuralPartialEq for PhysicalInsets<P>
Auto Trait Implementations§
impl<P> Freeze for PhysicalInsets<P>where
P: Freeze,
impl<P> RefUnwindSafe for PhysicalInsets<P>where
P: RefUnwindSafe,
impl<P> Send for PhysicalInsets<P>where
P: Send,
impl<P> Sync for PhysicalInsets<P>where
P: Sync,
impl<P> Unpin for PhysicalInsets<P>where
P: Unpin,
impl<P> UnwindSafe for PhysicalInsets<P>where
P: UnwindSafe,
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