[][src]Struct guion::util::bounds::Offset

pub struct Offset {
    pub x: i32,
    pub y: i32,
}

Fields

x: i32y: i32

Methods

impl Offset[src]

pub fn is_inside(&self, b: &Bounds) -> bool[src]

if the offset is inside the bound b

pub fn par(&self, o: Orientation) -> i32[src]

pub fn unpar(&self, o: Orientation) -> i32[src]

Trait Implementations

impl<'_> Add<&'_ Offset> for Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ Offset> for &'a Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ Offset> for &'a mut Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'_> Add<&'_ Offset> for Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ Offset> for &'a Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ Offset> for &'a mut Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'_> Add<&'_ mut Offset> for Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ mut Offset> for &'a Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ mut Offset> for &'a mut Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'_> Add<&'_ mut Offset> for Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ mut Offset> for &'a Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'a, '_> Add<&'_ mut Offset> for &'a mut Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl Add<Offset> for Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'a> Add<Offset> for &'a Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl<'a> Add<Offset> for &'a mut Bounds[src]

type Output = Bounds

The resulting type after applying the + operator.

impl Add<Offset> for Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'a> Add<Offset> for &'a Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'a> Add<Offset> for &'a mut Offset[src]

type Output = Offset

The resulting type after applying the + operator.

impl<'_> AddAssign<&'_ Offset> for Bounds[src]

impl<'a, '_> AddAssign<&'_ Offset> for &'a mut Bounds[src]

impl<'_> AddAssign<&'_ Offset> for Offset[src]

impl<'a, '_> AddAssign<&'_ Offset> for &'a mut Offset[src]

impl<'_> AddAssign<&'_ mut Offset> for Bounds[src]

impl<'a, '_> AddAssign<&'_ mut Offset> for &'a mut Bounds[src]

impl<'_> AddAssign<&'_ mut Offset> for Offset[src]

impl<'a, '_> AddAssign<&'_ mut Offset> for &'a mut Offset[src]

impl AddAssign<Offset> for Bounds[src]

impl<'a> AddAssign<Offset> for &'a mut Bounds[src]

impl AddAssign<Offset> for Offset[src]

impl<'a> AddAssign<Offset> for &'a mut Offset[src]

impl Clone for Offset[src]

impl Copy for Offset[src]

impl Default for Offset[src]

impl<T, U> From<(T, U)> for Offset where
    T: Into<i32>,
    U: Into<i32>, 
[src]

impl<'_> Sub<&'_ Offset> for Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ Offset> for &'a Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ Offset> for &'a mut Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'_> Sub<&'_ Offset> for Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ Offset> for &'a Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ Offset> for &'a mut Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'_> Sub<&'_ mut Offset> for Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ mut Offset> for &'a Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ mut Offset> for &'a mut Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'_> Sub<&'_ mut Offset> for Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ mut Offset> for &'a Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'a, '_> Sub<&'_ mut Offset> for &'a mut Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl Sub<Offset> for Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'a> Sub<Offset> for &'a Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl<'a> Sub<Offset> for &'a mut Bounds[src]

type Output = Bounds

The resulting type after applying the - operator.

impl Sub<Offset> for Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'a> Sub<Offset> for &'a Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'a> Sub<Offset> for &'a mut Offset[src]

type Output = Offset

The resulting type after applying the - operator.

impl<'_> SubAssign<&'_ Offset> for Bounds[src]

impl<'a, '_> SubAssign<&'_ Offset> for &'a mut Bounds[src]

impl<'_> SubAssign<&'_ Offset> for Offset[src]

impl<'a, '_> SubAssign<&'_ Offset> for &'a mut Offset[src]

impl<'_> SubAssign<&'_ mut Offset> for Bounds[src]

impl<'a, '_> SubAssign<&'_ mut Offset> for &'a mut Bounds[src]

impl<'_> SubAssign<&'_ mut Offset> for Offset[src]

impl<'a, '_> SubAssign<&'_ mut Offset> for &'a mut Offset[src]

impl SubAssign<Offset> for Bounds[src]

impl<'a> SubAssign<Offset> for &'a mut Bounds[src]

impl SubAssign<Offset> for Offset[src]

impl<'a> SubAssign<Offset> for &'a mut Offset[src]

Auto Trait Implementations

impl RefUnwindSafe for Offset

impl Send for Offset

impl Sync for Offset

impl Unpin for Offset

impl UnwindSafe for Offset

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AtomState<T> for T where
    T: Copy
[src]

impl<T> AtomStateMut<T> for T where
    T: Copy
[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.