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>
pub const fn new(top: P, left: P, bottom: P, right: P) -> LogicalInsets<P>
Source§impl<P> LogicalInsets<P>where
P: Pixel,
impl<P> LogicalInsets<P>where
P: Pixel,
pub fn from_physical<T, X>(physical: T, scale_factor: f64) -> LogicalInsets<P>
pub fn to_physical<X>(&self, scale_factor: f64) -> PhysicalInsets<X>where
X: Pixel,
pub fn cast<X>(&self) -> LogicalInsets<X>where
X: Pixel,
Trait Implementations§
Source§impl<P> Clone for LogicalInsets<P>where
P: Clone,
impl<P> Clone for LogicalInsets<P>where
P: Clone,
Source§fn clone(&self) -> LogicalInsets<P>
fn clone(&self) -> LogicalInsets<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P> Debug for LogicalInsets<P>where
P: Debug,
impl<P> Debug for LogicalInsets<P>where
P: Debug,
Source§impl<P> Default for LogicalInsets<P>where
P: Default,
impl<P> Default for LogicalInsets<P>where
P: Default,
Source§fn default() -> LogicalInsets<P>
fn default() -> LogicalInsets<P>
Returns the “default value” for a type. Read more
Source§impl<'de, P> Deserialize<'de> for LogicalInsets<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for LogicalInsets<P>where
P: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogicalInsets<P>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogicalInsets<P>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<P> From<LogicalInsets<P>> for Insetswhere
P: Pixel,
impl<P> From<LogicalInsets<P>> for Insetswhere
P: Pixel,
Source§fn from(insets: LogicalInsets<P>) -> Insets
fn from(insets: LogicalInsets<P>) -> Insets
Converts to this type from the input type.
Source§impl<P> Hash for LogicalInsets<P>where
P: Hash,
impl<P> Hash for LogicalInsets<P>where
P: Hash,
Source§impl<P> Ord for LogicalInsets<P>where
P: Ord,
impl<P> Ord for LogicalInsets<P>where
P: Ord,
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 for LogicalInsets<P>where
P: PartialEq,
impl<P> PartialEq for LogicalInsets<P>where
P: PartialEq,
Source§impl<P> PartialOrd for LogicalInsets<P>where
P: PartialOrd,
impl<P> PartialOrd for LogicalInsets<P>where
P: PartialOrd,
Source§impl<P> Serialize for LogicalInsets<P>where
P: Serialize,
impl<P> Serialize for LogicalInsets<P>where
P: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<P> Copy for LogicalInsets<P>where
P: Copy,
impl<P> Eq for LogicalInsets<P>where
P: Eq,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.