Struct ArrivingRows
pub struct ArrivingRows<K> { /* private fields */ }Expand description
The arrival timing of a widget’s pending rows, by row key.
The key is all that differs from one widget’s rows to another’s: it
names a row’s slot in RowArrivals, which holds every row’s timing,
fading and painting once, in the toolkit, for every list, table and
tree of every app.
Implementations§
§impl<K> ArrivingRows<K>
impl<K> ArrivingRows<K>
pub fn new() -> ArrivingRows<K>
pub fn observe<T, E>(
&mut self,
key: &K,
arrival: &Arrival<T, E>,
motion: Option<EffectiveMotion>,
now: Instant,
) -> Showing
pub fn observe<T, E>( &mut self, key: &K, arrival: &Arrival<T, E>, motion: Option<EffectiveMotion>, now: Instant, ) -> Showing
What row key shows at now, its model answering arrival. A row
first seen pending starts its timing now; a row that lands shows
once its skeleton stood its minimum, fading in under motion (none
when the widget has no theme yet: it shows at once).
pub fn face(
&self,
key: &K,
shape: SkeletonShape,
now: Instant,
) -> Option<ArrivalFace<'_>>
pub fn face( &self, key: &K, shape: SkeletonShape, now: Instant, ) -> Option<ArrivalFace<'_>>
The placeholder row key paints at now in shape, while it
shows one.
pub fn fade(&self, key: &K, now: Instant) -> Option<RowFade>
pub fn fade(&self, key: &K, now: Instant) -> Option<RowFade>
How row key fades in at now, while it does.
pub fn outgoing_face(
&self,
key: &K,
shape: SkeletonShape,
now: Instant,
) -> Option<(ArrivalFace<'_>, f32)>
pub fn outgoing_face( &self, key: &K, shape: SkeletonShape, now: Instant, ) -> Option<(ArrivalFace<'_>, f32)>
The placeholder step a landed row’s content replaced, at the
opacity it fades out with at now, while it does.
pub fn paint(
&self,
key: &K,
shape: SkeletonShape,
ctx: &mut PaintCtx<'_>,
rect: Rect,
now: Instant,
content: &mut dyn FnMut(&mut PaintCtx<'_>),
)
pub fn paint( &self, key: &K, shape: SkeletonShape, ctx: &mut PaintCtx<'_>, rect: Rect, now: Instant, content: &mut dyn FnMut(&mut PaintCtx<'_>), )
Paint what row key shows over its slot rect at now, with
content drawing the row’s own widget: the placeholder, or the
content fading in over the step it replaced, or just the content.
pub fn retain(&mut self, now: Instant, keep: impl FnMut(&K) -> bool)
pub fn retain(&mut self, now: Instant, keep: impl FnMut(&K) -> bool)
Keep only the rows keep names, and of those only the ones still
pending or fading in: a settled row needs no timing.
pub fn next_wake_deadline(&self, now: Instant) -> Option<Instant>
pub fn next_wake_deadline(&self, now: Instant) -> Option<Instant>
The next instant after now at which a placeholder changes: its next
step, or the content that landed showing once its skeleton stood its
minimum.
pub fn reveal_due(&self, now: Instant) -> bool
pub fn reveal_due(&self, now: Instant) -> bool
Whether a row is waiting to show content that landed: the widget
looks at its model again by now.
pub fn mark_drawn(&mut self, now: Instant)
pub fn mark_drawn(&mut self, now: Instant)
The widget drew what the rows show at now.
pub fn needs_redraw(&self, now: Instant) -> bool
pub fn needs_redraw(&self, now: Instant) -> bool
Whether what the rows show changed since the widget last drew them.
Trait Implementations§
§impl<K> Clone for ArrivingRows<K>where
K: Clone,
impl<K> Clone for ArrivingRows<K>where
K: Clone,
§fn clone(&self) -> ArrivingRows<K>
fn clone(&self) -> ArrivingRows<K>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<K> Debug for ArrivingRows<K>where
K: Debug,
impl<K> Debug for ArrivingRows<K>where
K: Debug,
§impl<K> Default for ArrivingRows<K>
impl<K> Default for ArrivingRows<K>
§fn default() -> ArrivingRows<K>
fn default() -> ArrivingRows<K>
Auto Trait Implementations§
impl<K> !Freeze for ArrivingRows<K>
impl<K> !RefUnwindSafe for ArrivingRows<K>
impl<K> Send for ArrivingRows<K>where
K: Send,
impl<K> !Sync for ArrivingRows<K>
impl<K> Unpin for ArrivingRows<K>where
K: Unpin,
impl<K> UnsafeUnpin for ArrivingRows<K>
impl<K> UnwindSafe for ArrivingRows<K>where
K: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more