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: T right: T bottom: T left: T

Methods

impl<T> SideOffsets2D<T>
[src]

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

impl<T: Clone> SideOffsets2D<T>
[src]

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

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

fn horizontal(&self) -> T

fn vertical(&self) -> T

impl<T: Zero> SideOffsets2D<T>
[src]

fn zero() -> SideOffsets2D<T>

Trait Implementations

impl<T: Debug> Debug for SideOffsets2D<T>
[src]

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

Formats the value using the given formatter.

impl<T: PartialEq> PartialEq for SideOffsets2D<T>
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl<T: Copy> Copy for SideOffsets2D<T>
[src]

impl<T: Clone> Clone for SideOffsets2D<T>
[src]

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

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<T: Add<T, Output=T>> Add for SideOffsets2D<T>
[src]

type Output = SideOffsets2D<T>

The resulting type after applying the + operator

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

The method for the + operator