[][src]Enum azul_webrender_api::DirtyRect

pub enum DirtyRect<T: Copy, U> {
    All,
    Partial(Rect<T, U>),
}

The possible states of a Dirty rect.

This exists because people kept getting confused with Option<Rect>.

Variants

All

Everything is Dirty, equivalent to Partial(image_bounds)

Partial(Rect<T, U>)

Some specific amount is dirty

Implementations

impl<T, U> DirtyRect<T, U> where
    T: Copy + Clone + PartialOrd + PartialEq + Add<T, Output = T> + Sub<T, Output = T> + Zero
[src]

pub fn empty() -> Self[src]

Creates an empty DirtyRect (indicating nothing is invalid)

pub fn is_empty(&self) -> bool[src]

Returns whether the dirty rect is empty

pub fn replace_with_empty(&mut self) -> Self[src]

Replaces self with the empty rect and returns the old value.

pub fn map<F>(self, func: F) -> Self where
    F: FnOnce(Rect<T, U>) -> Rect<T, U>, 
[src]

Maps over the contents of Partial.

pub fn union(&self, other: &Self) -> Self[src]

Unions the dirty rects.

pub fn intersection(&self, other: &Self) -> Self[src]

Intersects the dirty rects.

pub fn to_subrect_of(&self, rect: &Rect<T, U>) -> Rect<T, U>[src]

Converts the dirty rect into a subrect of the given one via intersection.

Trait Implementations

impl<T: Copy, U> Clone for DirtyRect<T, U>[src]

impl<T: Copy, U> Copy for DirtyRect<T, U>[src]

impl<T: Debug + Copy, U: Debug> Debug for DirtyRect<T, U>[src]

impl<'de, T: Copy, U> Deserialize<'de> for DirtyRect<T, U> where
    T: Deserialize<'de>,
    U: Deserialize<'de>, 
[src]

impl<T: Copy, U> From<Rect<T, U>> for DirtyRect<T, U>[src]

impl<T: Copy, U> Serialize for DirtyRect<T, U> where
    T: Serialize,
    U: Serialize
[src]

Auto Trait Implementations

impl<T, U> RefUnwindSafe for DirtyRect<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<T, U> Send for DirtyRect<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for DirtyRect<T, U> where
    T: Sync,
    U: Sync

impl<T, U> Unpin for DirtyRect<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> UnwindSafe for DirtyRect<T, U> where
    T: UnwindSafe,
    U: UnwindSafe

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.