pub struct Insets {
pub top: f64,
pub leading: f64,
pub bottom: f64,
pub trailing: f64,
}Expand description
Logical insets: leading/trailing resolve against the layout direction at place time (§7.8).
Fields§
§top: f64§leading: f64§bottom: f64§trailing: f64Implementations§
Source§impl Insets
impl Insets
pub const ZERO: Insets
Sourcepub const fn new(top: f64, leading: f64, bottom: f64, trailing: f64) -> Insets
pub const fn new(top: f64, leading: f64, bottom: f64, trailing: f64) -> Insets
Four explicit edges, in the order they are named.
pub const fn all(d: f64) -> Insets
pub const fn symmetric(horizontal: f64, vertical: f64) -> Insets
Sourcepub const fn horizontal(d: f64) -> Insets
pub const fn horizontal(d: f64) -> Insets
d on the leading and trailing edges, nothing above or below.
Sourcepub fn horizontal_total(&self) -> f64
pub fn horizontal_total(&self) -> f64
The width the insets take: leading plus trailing.
Sourcepub fn vertical_total(&self) -> f64
pub fn vertical_total(&self) -> f64
The height the insets take: top plus bottom.
Trait Implementations§
impl Copy for Insets
Source§impl IntoInsets for Insets
impl IntoInsets for Insets
fn into_insets(self) -> Insets
impl StructuralPartialEq for Insets
Auto Trait Implementations§
impl Freeze for Insets
impl RefUnwindSafe for Insets
impl Send for Insets
impl Sync for Insets
impl Unpin for Insets
impl UnsafeUnpin for Insets
impl UnwindSafe for Insets
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more