pub struct AnimatedOpacityView<State: 'static> { /* private fields */ }Expand description
A declarative opacity wrapper. See the module docs.
Implementations§
Source§impl<State: 'static> AnimatedOpacityView<State>
impl<State: 'static> AnimatedOpacityView<State>
Sourcepub fn cached(self, cached: bool) -> Self
pub fn cached(self, cached: bool) -> Self
Paint the child through a retained-page boundary
(repaint_boundary) and drive the fade
through its composite alpha (default false): a running fade over an
unchanged child composites the retained page instead of painting the
child every frame. Worth it for an expensive child that stays still
while it fades.
Trait Implementations§
Source§impl<State: 'static> View<State> for AnimatedOpacityView<State>
impl<State: 'static> View<State> for AnimatedOpacityView<State>
Source§type Element = AnimatedOpacityWidget
type Element = AnimatedOpacityWidget
The retained widget this view produces.
Source§fn build(&self, ctx: &mut BuildCtx<'_>) -> AnimatedOpacityWidget
fn build(&self, ctx: &mut BuildCtx<'_>) -> AnimatedOpacityWidget
Materialise a fresh widget for this view.
Source§fn rebuild(
&self,
prev: &Self,
element: &mut AnimatedOpacityWidget,
ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, element: &mut AnimatedOpacityWidget, ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
Reconcile
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl<State> !RefUnwindSafe for AnimatedOpacityView<State>
impl<State> !Send for AnimatedOpacityView<State>
impl<State> !Sync for AnimatedOpacityView<State>
impl<State> !UnwindSafe for AnimatedOpacityView<State>
impl<State> Freeze for AnimatedOpacityView<State>
impl<State> Unpin for AnimatedOpacityView<State>
impl<State> UnsafeUnpin for AnimatedOpacityView<State>where
AnyView<State>: UnsafeUnpin,
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> ErasedDestructor for Twhere
T: 'static,
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.