[−][src]Enum webrender_api::DirtyRect
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(TypedRect<T, U>)
Some specific amount is dirty
Methods
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(TypedRect<T, U>) -> TypedRect<T, U>,
[src]
F: FnOnce(TypedRect<T, U>) -> TypedRect<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: &TypedRect<T, U>) -> TypedRect<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]
Performs copy-assignment from source
. Read more
impl<T: Copy, U> From<TypedRect<T, U>> 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]
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> Serialize for DirtyRect<T, U> where
T: Serialize,
U: Serialize,
[src]
T: Serialize,
U: Serialize,
Auto Trait Implementations
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,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
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]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,