pub enum RenderComparison {
Identical,
Metadata,
Paint,
Layout,
}Expand description
The description of the difference between two objects, in the context of how it will affect the rendering.
Used by TextSpan.compareTo and TextStyle.compareTo.
The values in this enum are ordered such that they are in increasing order
of cost. A value with index N implies all the values with index less than N.
For example, RenderComparison::Layout (index 3) implies
RenderComparison::Paint (2).
Variants§
Identical
The two objects are identical (meaning deeply equal, not necessarily pointer-identical).
Metadata
The two objects are identical for the purpose of layout, but may be different in other ways.
For example, maybe some event handlers changed.
Paint
The two objects are different but only in ways that affect paint, not layout.
For example, only the color is changed.
RenderObject.markNeedsPaint would be necessary to handle this kind of
change in a render object.
Layout
The two objects are different in ways that affect layout (and therefore paint).
For example, the size is changed.
This is the most drastic level of change possible.
RenderObject.markNeedsLayout would be necessary to handle this kind of
change in a render object.
Trait Implementations§
Source§impl Clone for RenderComparison
impl Clone for RenderComparison
Source§fn clone(&self) -> RenderComparison
fn clone(&self) -> RenderComparison
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RenderComparison
Source§impl Debug for RenderComparison
impl Debug for RenderComparison
impl Eq for RenderComparison
Source§impl Ord for RenderComparison
impl Ord for RenderComparison
Source§fn cmp(&self, other: &RenderComparison) -> Ordering
fn cmp(&self, other: &RenderComparison) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RenderComparison
impl PartialEq for RenderComparison
Source§impl PartialOrd for RenderComparison
impl PartialOrd for RenderComparison
impl StructuralPartialEq for RenderComparison
Auto Trait Implementations§
impl Forget for RenderComparison
impl Freeze for RenderComparison
impl Move for RenderComparison
impl RefUnwindSafe for RenderComparison
impl Send for RenderComparison
impl Sync for RenderComparison
impl Unpin for RenderComparison
impl UnsafeUnpin for RenderComparison
impl UnwindSafe for RenderComparison
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.