Skip to main content

Slot

Struct Slot 

Source
pub struct Slot<P> { /* private fields */ }
Expand description

One prop’s value as written, as last asked for, and its travel between the two.

Implementations§

Source§

impl<P: Clone + PartialEq> Slot<P>

Source

pub fn shown(&self) -> Option<&P>

What is written on the node. None before the first write.

Source

pub fn aim(&mut self, target: P, tween: Option<Tween<P>>, tick: Tick)

Heads for target: over tween from what is written now, or at once when there is no tween, nothing written yet, or motion is reduced.

Source

pub fn step(&mut self, tick: Tick, write: impl FnOnce(&P)) -> bool

Moves on by tick, and calls write with the value to show if it differs from what is written. Returns whether it is still travelling.

Trait Implementations§

Source§

impl<P> Default for Slot<P>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<P> Freeze for Slot<P>
where Option<P>: Freeze, Option<Run<P>>: Freeze,

§

impl<P> RefUnwindSafe for Slot<P>

§

impl<P> Send for Slot<P>
where Option<P>: Send, Option<Run<P>>: Send,

§

impl<P> Sync for Slot<P>
where Option<P>: Sync, Option<Run<P>>: Sync,

§

impl<P> Unpin for Slot<P>
where Option<P>: Unpin, Option<Run<P>>: Unpin,

§

impl<P> UnsafeUnpin for Slot<P>
where Option<P>: UnsafeUnpin, Option<Run<P>>: UnsafeUnpin,

§

impl<P> UnwindSafe for Slot<P>
where Option<P>: UnwindSafe, Option<Run<P>>: 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
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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<V> ScopedExt for V

Source§

fn rules<F>(self, rules: F) -> Rules<Self, F>

This view, built in a scope where rules ran first. Rules marked root reach its root node alone.
Source§

fn when_in<C, F>(self, rules: F) -> When<Self, F, C>

This view, with rules holding while its root node is in the state C. See Cx::when.
Source§

fn transition(self, motion: Motion) -> Transition<Self>

This view, with every element in it travelling to new values over the theme’s curve for motion.
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.