pub struct ChangeFlags(/* private fields */);Expand description
Bitflags describing what work a View::rebuild pass invalidated.
Combine with |. LAYOUT implies a subsequent paint, but the flags are
stored orthogonally so a caller can distinguish “geometry changed” from
“only pixels changed”; use ChangeFlags::needs_paint for the common
“does anything need repainting?” query.
Implementations§
Source§impl ChangeFlags
impl ChangeFlags
Sourcepub const NONE: ChangeFlags
pub const NONE: ChangeFlags
Nothing changed; no downstream work required.
Sourcepub const PAINT: ChangeFlags
pub const PAINT: ChangeFlags
The widget must be re-painted.
Sourcepub const LAYOUT: ChangeFlags
pub const LAYOUT: ChangeFlags
The widget must be re-laid-out (and therefore re-painted).
Sourcepub const fn contains(self, other: ChangeFlags) -> bool
pub const fn contains(self, other: ChangeFlags) -> bool
Whether self contains every bit set in other.
Sourcepub const fn union(self, other: ChangeFlags) -> ChangeFlags
pub const fn union(self, other: ChangeFlags) -> ChangeFlags
The union of two flag sets.
Sourcepub const fn needs_paint(self) -> bool
pub const fn needs_paint(self) -> bool
Whether this change requires a repaint (either PAINT or LAYOUT).
Sourcepub const fn needs_layout(self) -> bool
pub const fn needs_layout(self) -> bool
Whether this change requires a relayout.
Trait Implementations§
Source§impl BitOr for ChangeFlags
impl BitOr for ChangeFlags
Source§type Output = ChangeFlags
type Output = ChangeFlags
The resulting type after applying the
| operator.Source§fn bitor(self, rhs: ChangeFlags) -> ChangeFlags
fn bitor(self, rhs: ChangeFlags) -> ChangeFlags
Performs the
| operation. Read moreSource§impl BitOrAssign for ChangeFlags
impl BitOrAssign for ChangeFlags
Source§fn bitor_assign(&mut self, rhs: ChangeFlags)
fn bitor_assign(&mut self, rhs: ChangeFlags)
Performs the
|= operation. Read moreSource§impl Clone for ChangeFlags
impl Clone for ChangeFlags
Source§fn clone(&self) -> ChangeFlags
fn clone(&self) -> ChangeFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChangeFlags
Source§impl Debug for ChangeFlags
impl Debug for ChangeFlags
Source§impl Default for ChangeFlags
impl Default for ChangeFlags
Source§fn default() -> ChangeFlags
fn default() -> ChangeFlags
Returns the “default value” for a type. Read more
impl Eq for ChangeFlags
Source§impl PartialEq for ChangeFlags
impl PartialEq for ChangeFlags
impl StructuralPartialEq for ChangeFlags
Auto Trait Implementations§
impl Freeze for ChangeFlags
impl RefUnwindSafe for ChangeFlags
impl Send for ChangeFlags
impl Sync for ChangeFlags
impl Unpin for ChangeFlags
impl UnsafeUnpin for ChangeFlags
impl UnwindSafe for ChangeFlags
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
Mutably borrows from an owned value. Read more
impl<T> Brush for 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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.