[][src]Struct kas::layout::Margins

pub struct Margins {
    pub horiz: (u16, u16),
    pub vert: (u16, u16),
}

Margin sizes

Used by the layout system for margins around child widgets. Margins may be drawn in and handle events like any other widget area.

Fields

horiz: (u16, u16)

Size of horizontal margins

vert: (u16, u16)

Size of vertical margins

Implementations

impl Margins[src]

pub const ZERO: Margins[src]

Zero-sized margins

pub const fn uniform(size: u16) -> Self[src]

Margins with equal size on each edge.

pub const fn hv(horiz: (u16, u16), vert: (u16, u16)) -> Self[src]

Margins via horizontal and vertical sizes

pub const fn hv_uniform(h: u16, v: u16) -> Self[src]

Margins via horizontal and vertical sizes

pub fn pad(self, size: Size) -> Size[src]

Pad a size with margins

Trait Implementations

impl Clone for Margins[src]

impl Copy for Margins[src]

impl Debug for Margins[src]

impl Default for Margins[src]

Auto Trait Implementations

impl RefUnwindSafe for Margins

impl Send for Margins

impl Sync for Margins

impl Unpin for Margins

impl UnwindSafe for Margins

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.