[−][src]Struct euclid::TypedSideOffsets2D
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) -> SelfConstructor 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>
) -> SelfConstructor 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) -> SelfConstructor 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>) -> SelfConstructor 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) -> Tpub fn vertical(&self) -> T[src]
pub fn vertical(&self) -> Tpub 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, U> PartialEq<TypedSideOffsets2D<T, U>> for TypedSideOffsets2D<T, U> where
T: PartialEq, [src]
impl<T, U> PartialEq<TypedSideOffsets2D<T, U>> for TypedSideOffsets2D<T, U> where
T: PartialEq, fn eq(&self, other: &Self) -> bool[src]
fn eq(&self, other: &Self) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
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: 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) -> ResultFormats the value using the given formatter. Read more
impl<T, U> Add<TypedSideOffsets2D<T, U>> for TypedSideOffsets2D<T, U> where
T: Copy + Add<T, Output = T>, [src]
impl<T, U> Add<TypedSideOffsets2D<T, U>> for TypedSideOffsets2D<T, U> where
T: Copy + Add<T, Output = T>, type Output = Self
The resulting type after applying the + operator.
fn add(self, other: Self) -> Self[src]
fn add(self, other: Self) -> SelfPerforms the + operation.
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: Copy, U> Copy for TypedSideOffsets2D<T, U>[src]
impl<T: Copy, U> Copy for TypedSideOffsets2D<T, U>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) -> SelfReturns 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, U> Serialize for TypedSideOffsets2D<T, U> where
T: Serialize, [src]
impl<T, U> Serialize for TypedSideOffsets2D<T, U> where
T: Serialize, fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer, [src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer, Serialize this value into the given Serde serializer. Read more
impl<'de, T, U> Deserialize<'de> for TypedSideOffsets2D<T, U> where
T: Deserialize<'de>, [src]
impl<'de, T, U> Deserialize<'de> for TypedSideOffsets2D<T, U> where
T: Deserialize<'de>, fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, Deserialize this value from the given Serde deserializer. Read more
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, Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,