pub struct LogicalInsets<P> {
pub top: P,
pub left: P,
pub bottom: P,
pub right: P,
}
Expand description
The logical 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> LogicalInsets<P>
impl<P> LogicalInsets<P>
Source§impl<P: Pixel> LogicalInsets<P>
impl<P: Pixel> LogicalInsets<P>
pub fn from_physical<T: Into<PhysicalInsets<X>>, X: Pixel>( physical: T, scale_factor: f64, ) -> Self
pub fn to_physical<X: Pixel>(&self, scale_factor: f64) -> PhysicalInsets<X>
pub fn cast<X: Pixel>(&self) -> LogicalInsets<X>
Trait Implementations§
Source§impl<P: Clone> Clone for LogicalInsets<P>
impl<P: Clone> Clone for LogicalInsets<P>
Source§fn clone(&self) -> LogicalInsets<P>
fn clone(&self) -> LogicalInsets<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 LogicalInsets<P>
impl<P: Debug> Debug for LogicalInsets<P>
Source§impl<P: Default> Default for LogicalInsets<P>
impl<P: Default> Default for LogicalInsets<P>
Source§fn default() -> LogicalInsets<P>
fn default() -> LogicalInsets<P>
Returns the “default value” for a type. Read more
Source§impl<P: Pixel> From<LogicalInsets<P>> for Insets
impl<P: Pixel> From<LogicalInsets<P>> for Insets
Source§fn from(insets: LogicalInsets<P>) -> Self
fn from(insets: LogicalInsets<P>) -> Self
Converts to this type from the input type.
Source§impl<P: Hash> Hash for LogicalInsets<P>
impl<P: Hash> Hash for LogicalInsets<P>
Source§impl<P: Ord> Ord for LogicalInsets<P>
impl<P: Ord> Ord for LogicalInsets<P>
Source§fn cmp(&self, other: &LogicalInsets<P>) -> Ordering
fn cmp(&self, other: &LogicalInsets<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 LogicalInsets<P>
impl<P: PartialEq> PartialEq for LogicalInsets<P>
Source§impl<P: PartialOrd> PartialOrd for LogicalInsets<P>
impl<P: PartialOrd> PartialOrd for LogicalInsets<P>
impl<P: Copy> Copy for LogicalInsets<P>
impl<P: Eq> Eq for LogicalInsets<P>
impl<P> StructuralPartialEq for LogicalInsets<P>
Auto Trait Implementations§
impl<P> Freeze for LogicalInsets<P>where
P: Freeze,
impl<P> RefUnwindSafe for LogicalInsets<P>where
P: RefUnwindSafe,
impl<P> Send for LogicalInsets<P>where
P: Send,
impl<P> Sync for LogicalInsets<P>where
P: Sync,
impl<P> Unpin for LogicalInsets<P>where
P: Unpin,
impl<P> UnwindSafe for LogicalInsets<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