Struct ArrivalClock
pub struct ArrivalClock { /* private fields */ }Expand description
The timing of one read, from the moment it was asked: the one place the
placeholder steps are decided, for crate::widget::ArrivingView and for
immediate-mode painters alike.
Implementations§
§impl ArrivalClock
impl ArrivalClock
pub fn new(since: Instant, from: Source) -> ArrivalClock
pub fn new(since: Instant, from: Source) -> ArrivalClock
A read asked at since, from from, with this window’s frame
budget.
pub fn with_budget(
since: Instant,
from: Source,
budget: Duration,
) -> ArrivalClock
pub fn with_budget( since: Instant, from: Source, budget: Duration, ) -> ArrivalClock
A read asked at since, from from, given budget for a local
answer.
pub fn answered_from(&self, from: Source) -> ArrivalClock
pub fn answered_from(&self, from: Source) -> ArrivalClock
The same read, its answer now coming from from: what stands in for
it changed (a window’s place taken over by its app), and when it was
asked did not. An answer that already landed is forgotten with the
content it was for.
pub fn arrive(&mut self, at: Instant)
pub fn arrive(&mut self, at: Instant)
The answer (or a failure) landed at at. Only the first landing
counts.
pub fn has_arrived(&self) -> bool
pub fn has_arrived(&self) -> bool
Whether the answer landed.
pub fn shows_at(&self) -> Option<Instant>
pub fn shows_at(&self) -> Option<Instant>
When the answer shows: when it landed, or once a skeleton that
showed has stood MIN_SHOWN.
pub fn holds_frame(&self, now: Instant) -> bool
pub fn holds_frame(&self, now: Instant) -> bool
Whether a frame showing this read waits for it at now: a local
read inside its frame budget, with no answer yet.
pub fn holds_frame_until(&self, now: Instant) -> Option<Instant>
pub fn holds_frame_until(&self, now: Instant) -> Option<Instant>
Until when a frame showing this read waits for it, while it does.
pub fn arrives_with_motion(&self) -> bool
pub fn arrives_with_motion(&self) -> bool
Whether the answer moves in (cross-fades) when it shows. A local answer inside the frame budget lands at once: the person never saw the space without it.
pub fn replaced_step(&self) -> Step
pub fn replaced_step(&self) -> Step
The placeholder step the answer replaces when it shows: what stood there just before.
pub fn next_step_at(&self, now: Instant) -> Option<Instant>
pub fn next_step_at(&self, now: Instant) -> Option<Instant>
The next instant after now at which Self::step changes; None
once the answer shows, or while nothing will change until it lands.
Trait Implementations§
§impl Clone for ArrivalClock
impl Clone for ArrivalClock
§fn clone(&self) -> ArrivalClock
fn clone(&self) -> ArrivalClock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ArrivalClock
impl Debug for ArrivalClock
§impl PartialEq for ArrivalClock
impl PartialEq for ArrivalClock
impl Eq for ArrivalClock
impl StructuralPartialEq for ArrivalClock
Auto Trait Implementations§
impl Freeze for ArrivalClock
impl RefUnwindSafe for ArrivalClock
impl Send for ArrivalClock
impl Sync for ArrivalClock
impl Unpin for ArrivalClock
impl UnsafeUnpin for ArrivalClock
impl UnwindSafe for ArrivalClock
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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