Struct euclid::TypedSideOffsets2D [−][src]
#[repr(C)]pub struct TypedSideOffsets2D<T, U> { pub top: T, pub right: T, pub bottom: T, pub left: T, // some fields omitted }
Fields
top: T
right: T
bottom: T
left: T
Methods
impl<T: Copy, U> TypedSideOffsets2D<T, U>
[src]
impl<T: Copy, U> TypedSideOffsets2D<T, U>
pub fn new(top: T, right: T, bottom: T, left: T) -> Self
[src]
pub fn new(top: T, right: T, bottom: T, left: T) -> Self
Constructor taking a scalar for each side.
pub fn from_lengths(
top: Length<T, U>,
right: Length<T, U>,
bottom: Length<T, U>,
left: Length<T, U>
) -> Self
[src]
pub fn from_lengths(
top: Length<T, U>,
right: Length<T, U>,
bottom: Length<T, U>,
left: Length<T, U>
) -> Self
Constructor taking a typed Length for each side.
pub fn top_typed(&self) -> Length<T, U>
[src]
pub fn top_typed(&self) -> Length<T, U>
Access self.top as a typed Length instead of a scalar value.
pub fn right_typed(&self) -> Length<T, U>
[src]
pub fn right_typed(&self) -> Length<T, U>
Access self.right as a typed Length instead of a scalar value.
pub fn bottom_typed(&self) -> Length<T, U>
[src]
pub fn bottom_typed(&self) -> Length<T, U>
Access self.bottom as a typed Length instead of a scalar value.
pub fn left_typed(&self) -> Length<T, U>
[src]
pub fn left_typed(&self) -> Length<T, U>
Access self.left as a typed Length instead of a scalar value.
pub fn new_all_same(all: T) -> Self
[src]
pub fn new_all_same(all: T) -> Self
Constructor setting the same value to all sides, taking a scalar value directly.
pub fn from_length_all_same(all: Length<T, U>) -> Self
[src]
pub fn from_length_all_same(all: Length<T, U>) -> Self
Constructor setting the same value to all sides, taking a typed Length.
impl<T, U> TypedSideOffsets2D<T, U> where
T: Add<T, Output = T> + Copy,
[src]
impl<T, U> TypedSideOffsets2D<T, U> where
T: Add<T, Output = T> + Copy,
pub fn horizontal(&self) -> T
[src]
pub fn horizontal(&self) -> T
pub fn vertical(&self) -> T
[src]
pub fn vertical(&self) -> T
pub fn horizontal_typed(&self) -> Length<T, U>
[src]
pub fn horizontal_typed(&self) -> Length<T, U>
pub fn vertical_typed(&self) -> Length<T, U>
[src]
pub fn vertical_typed(&self) -> Length<T, U>
impl<T: Copy + Zero, U> TypedSideOffsets2D<T, U>
[src]
impl<T: Copy + Zero, U> TypedSideOffsets2D<T, U>
Trait Implementations
impl<T: Clone, U> Clone for TypedSideOffsets2D<T, U>
[src]
impl<T: Clone, U> Clone for TypedSideOffsets2D<T, U>
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Copy, U> Copy for TypedSideOffsets2D<T, U>
[src]
impl<T: Copy, U> Copy for TypedSideOffsets2D<T, U>
impl<T, U> Eq for TypedSideOffsets2D<T, U> where
T: Eq,
[src]
impl<T, U> Eq for TypedSideOffsets2D<T, U> where
T: Eq,
impl<T, U> PartialEq for TypedSideOffsets2D<T, U> where
T: PartialEq,
[src]
impl<T, U> PartialEq for TypedSideOffsets2D<T, U> where
T: PartialEq,
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<T, U> Hash for TypedSideOffsets2D<T, U> where
T: Hash,
[src]
impl<T, U> Hash for TypedSideOffsets2D<T, U> where
T: Hash,
fn hash<H: Hasher>(&self, h: &mut H)
[src]
fn hash<H: Hasher>(&self, h: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Debug, U> Debug for TypedSideOffsets2D<T, U>
[src]
impl<T: Debug, U> Debug for TypedSideOffsets2D<T, U>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T, U> Add for TypedSideOffsets2D<T, U> where
T: Copy + Add<T, Output = T>,
[src]
impl<T, U> Add for TypedSideOffsets2D<T, U> where
T: Copy + Add<T, Output = T>,
Auto Trait Implementations
impl<T, U> Send for TypedSideOffsets2D<T, U> where
T: Send,
U: Send,
impl<T, U> Send for TypedSideOffsets2D<T, U> where
T: Send,
U: Send,
impl<T, U> Sync for TypedSideOffsets2D<T, U> where
T: Sync,
U: Sync,
impl<T, U> Sync for TypedSideOffsets2D<T, U> where
T: Sync,
U: Sync,