Struct euclid::side_offsets::SideOffsets2D [] [src]

pub struct SideOffsets2D<T> {
    pub top: T,
    pub right: T,
    pub bottom: T,
    pub left: T,
}

A group of side offsets, which correspond to top/left/bottom/right for borders, padding, and margins in CSS.

Fields

top
right
bottom
left

Methods

impl<T> SideOffsets2D<T>

fn new(top: T, right: T, bottom: T, left: T) -> SideOffsets2D<T>

impl<T: Clone> SideOffsets2D<T>

fn new_all_same(all: T) -> SideOffsets2D<T>

impl<T> SideOffsets2D<T> where T: Add<T, Output=T> + Copy

fn horizontal(&self) -> T

fn vertical(&self) -> T

impl<T: Zero> SideOffsets2D<T>

fn zero() -> SideOffsets2D<T>

Trait Implementations

impl<T: Add<T, Output=T>> Add for SideOffsets2D<T>

type Output = SideOffsets2D<T>

fn add(self, other: SideOffsets2D<T>) -> SideOffsets2D<T>

Derived Implementations

impl<T: Debug> Debug for SideOffsets2D<T>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<T: PartialEq> PartialEq for SideOffsets2D<T>

fn eq(&self, __arg_0: &SideOffsets2D<T>) -> bool

fn ne(&self, __arg_0: &SideOffsets2D<T>) -> bool

impl<T: Eq> Eq for SideOffsets2D<T>

impl<T: Copy> Copy for SideOffsets2D<T>

impl<T: Clone> Clone for SideOffsets2D<T>

fn clone(&self) -> SideOffsets2D<T>

1.0.0fn clone_from(&mut self, source: &Self)