[][src]Struct orbtk_utils::Thickness

pub struct Thickness {
    pub left: f64,
    pub top: f64,
    pub right: f64,
    pub bottom: f64,
}

Used to describes a thickness e.g a border thickness.

Fields

left: f64

Left of thickness.

top: f64

Top of thickness.

right: f64

Right of thickness.

bottom: f64

Bottom of thickness.

Implementations

impl Thickness[src]

pub fn new(left: f64, top: f64, right: f64, bottom: f64) -> Self[src]

Create a new thickness with the given parameters.

pub fn left(&self) -> f64[src]

Gets left.

pub fn set_left(&mut self, left: f64)[src]

Sets left.

pub fn top(&self) -> f64[src]

Gets top.

pub fn set_top(&mut self, top: f64)[src]

Sets top.

pub fn right(&self) -> f64[src]

Gets right.

pub fn set_right(&mut self, right: f64)[src]

Sets right.

pub fn bottom(&self) -> f64[src]

Gets bottom.

pub fn set_bottom(&mut self, bottom: f64)[src]

Sets bottom.

pub fn thickness(&self) -> Thickness[src]

Gets thickness.

pub fn set_thickness<T: Into<Thickness>>(&mut self, thickness: T)[src]

Sets thickness.

Trait Implementations

impl Clone for Thickness[src]

impl Copy for Thickness[src]

impl Debug for Thickness[src]

impl Default for Thickness[src]

impl From<(f64, f64, f64, f64)> for Thickness[src]

impl From<(f64, f64)> for Thickness[src]

impl From<(i32, i32, i32, i32)> for Thickness[src]

impl From<(i32, i32)> for Thickness[src]

impl From<Value> for Thickness[src]

impl From<f64> for Thickness[src]

impl From<i32> for Thickness[src]

impl PartialEq<Thickness> for Thickness[src]

impl StructuralPartialEq for Thickness[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.