Struct Beckon
pub struct Beckon;Expand description
A control hint’s motion (crate::control_hints).
Implementations§
§impl Beckon
impl Beckon
pub const GESTURE_PERIOD: Duration
pub const GESTURE_PERIOD: Duration
One loop of the picture’s gesture.
pub const RESTING_PHASE: f64 = 0.7
pub const RESTING_PHASE: f64 = 0.7
Where in its loop the picture rests when motion may not loop: the gesture well under way, so the still picture says what to do.
pub const GESTURE_LOOPS: u32 = 3
pub const GESTURE_LOOPS: u32 = 3
How many times the picture shows its gesture before it rests: the
last loop stops at Self::RESTING_PHASE, where it rests.
pub const COMPLETION: Duration
pub const COMPLETION: Duration
The whole acknowledgement, after which nothing is drawn.
pub fn arrival(age: Duration, motion: EffectiveMotion) -> Arrival
pub fn arrival(age: Duration, motion: EffectiveMotion) -> Arrival
The card age after it began to arrive.
pub fn gesture_phase(age: Duration, motion: EffectiveMotion) -> f64
pub fn gesture_phase(age: Duration, motion: EffectiveMotion) -> f64
Where the picture is in its gesture’s loop, 0..1, age after the
card began to arrive; Self::RESTING_PHASE where motion may not
loop.
pub fn stroke(phase: f64, from: f64, to: f64) -> f64
pub fn stroke(phase: f64, from: f64, to: f64) -> f64
How far one stroke of the picture’s gesture, which runs over
from..to of its loop, has got at phase: 0..=1, starting and
stopping gently as a hand does.
pub fn leaving(age: Duration, motion: EffectiveMotion) -> f32
pub fn leaving(age: Duration, motion: EffectiveMotion) -> f32
The card going away unanswered, age after it began to: it fades
where it is, at base (fast under reduced motion).
pub fn leaving_time(motion: EffectiveMotion) -> Duration
pub fn leaving_time(motion: EffectiveMotion) -> Duration
How long Self::leaving takes.
pub fn completion(age: Duration, motion: EffectiveMotion) -> Option<Completion>
pub fn completion(age: Duration, motion: EffectiveMotion) -> Option<Completion>
The acknowledgement, age after the gesture was done; None once it
is over.
pub fn next_frame(
shown: Instant,
now: Instant,
motion: EffectiveMotion,
) -> Option<Instant>
pub fn next_frame( shown: Instant, now: Instant, motion: EffectiveMotion, ) -> Option<Instant>
When a hint shown since shown next needs a frame: soon while it
arrives or its picture loops, never once it rests still.
Auto Trait Implementations§
impl Freeze for Beckon
impl RefUnwindSafe for Beckon
impl Send for Beckon
impl Sync for Beckon
impl Unpin for Beckon
impl UnsafeUnpin for Beckon
impl UnwindSafe for Beckon
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
§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<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