pub struct Thickness(/* private fields */);Expand description
Four edge values measured in device-independent pixels (DIPs).
Implementations§
Source§impl Thickness
impl Thickness
Sourcepub fn xy(horizontal: f64, vertical: f64) -> Self
pub fn xy(horizontal: f64, vertical: f64) -> Self
Uses one DIP value for horizontal edges and another for vertical edges.
Sourcepub fn new(left: f64, top: f64, right: f64, bottom: f64) -> Self
pub fn new(left: f64, top: f64, right: f64, bottom: f64) -> Self
Creates edge values in left, top, right, bottom order, measured in DIPs.
pub fn left(&self) -> f64
pub fn top(&self) -> f64
pub fn right(&self) -> f64
pub fn bottom(&self) -> f64
Trait Implementations§
Source§impl From<Thickness> for ResourceValue
impl From<Thickness> for ResourceValue
Auto Trait Implementations§
impl !Send for Thickness
impl !Sync for Thickness
impl Freeze for Thickness
impl RefUnwindSafe for Thickness
impl Unpin for Thickness
impl UnsafeUnpin for Thickness
impl UnwindSafe for Thickness
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