Skip to main content

ArrivingRows

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>
where K: Clone + Eq + Hash,

pub fn new() -> ArrivingRows<K>

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<'_>>

The placeholder row key paints at now in shape, while it shows one.

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)>

The placeholder step a landed row’s content replaced, at the opacity it fades out with at now, while it does.

pub fn contains(&self, key: &K) -> bool

Whether row key is pending or fading in.

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)

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 is_moving(&self, now: Instant) -> bool

Whether a row is fading in at now.

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

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)

The widget drew what the rows show at now.

pub fn needs_redraw(&self, now: Instant) -> bool

Whether what the rows show changed since the widget last drew them.

pub fn is_empty(&self) -> bool

Whether any row is pending or fading in.

Trait Implementations§

§

impl<K> Clone for ArrivingRows<K>
where K: Clone,

§

fn clone(&self) -> ArrivingRows<K>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<K> Debug for ArrivingRows<K>
where K: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<K> Default for ArrivingRows<K>

§

fn default() -> ArrivingRows<K>

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsAny for T
where T: 'static,

§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: 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.
§

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.
§

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.
§

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.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts 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>

Converts 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)

Converts &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)

Converts &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
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Fruit for T
where T: Send + Downcast,

§

impl<T> WasmNotSend for T
where T: Send,