[−][src]Enum azul_webrender_api::DirtyRect
The possible states of a Dirty rect.
This exists because people kept getting confused with Option<Rect>
.
Variants
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]
T: Copy + Clone + PartialOrd + PartialEq + Add<T, Output = T> + Sub<T, Output = T> + Zero,
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]
F: FnOnce(Rect<T, U>) -> Rect<T, U>,
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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
T: Deserialize<'de>,
U: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
T: Serialize,
U: Serialize,
Auto Trait Implementations
impl<T, U> RefUnwindSafe for DirtyRect<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for DirtyRect<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for DirtyRect<T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
impl<T, U> Unpin for DirtyRect<T, U> where
T: Unpin,
U: Unpin,
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for DirtyRect<T, U> where
T: UnwindSafe,
U: UnwindSafe,
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,