pub struct MotionTreeState<K, V> { /* private fields */ }Expand description
Native owner for a portable variant tree; shares the graph’s explicit clock contract.
Implementations§
Methods from Deref<Target = MotionTree<K, V>>§
Sourcepub fn add(&mut self, declaration: MotionNode<K, V>) -> Result<(), TreeError>
pub fn add(&mut self, declaration: MotionNode<K, V>) -> Result<(), TreeError>
Adds a unique node. Parents must already exist; invalid additions are transactional.
Sourcepub fn set_variant(
&mut self,
variant: &V,
now: Duration,
reduced: bool,
) -> Result<(), TreeError>
pub fn set_variant( &mut self, variant: &V, now: Duration, reduced: bool, ) -> Result<(), TreeError>
Propagates a variant through inheriting roots/descendants. A non-inheriting node blocks propagation through its subtree. New variants interrupt smoothly.
Sourcepub fn set_node_variant(
&mut self,
key: &K,
variant: &V,
now: Duration,
reduced: bool,
) -> Result<(), TreeError>
pub fn set_node_variant( &mut self, key: &K, variant: &V, now: Duration, reduced: bool, ) -> Result<(), TreeError>
Explicitly changes one subtree, including its root even when inheritance is disabled.
Sourcepub fn set_motion(
&mut self,
key: &K,
motion: Motion,
now: Duration,
reduced: bool,
) -> Result<(), TreeError>
pub fn set_motion( &mut self, key: &K, motion: Motion, now: Duration, reduced: bool, ) -> Result<(), TreeError>
Retargets one node from application-computed data while retaining its
parent/child timing policy. Other nodes keep their current declarations.
Returns Identity without mutation for an unknown key.
Sourcepub fn sample(&mut self, now: Duration, reduced: bool)
pub fn sample(&mut self, now: Duration, reduced: bool)
Advances one monotonic frame. Reduced motion bypasses gates and delays.
Sourcepub fn get(&self, key: &K) -> Option<Frame>
pub fn get(&self, key: &K) -> Option<Frame>
Current node presentation, for ordinary native Frame application.
Sourcepub fn is_mounted(&self, key: &K) -> bool
pub fn is_mounted(&self, key: &K) -> bool
Keeps an exiting root mounted until its entire nested subtree exits. Once false, the host may release that view/entity and restore focus.
Sourcepub fn is_animating(&self) -> bool
pub fn is_animating(&self) -> bool
Whether a trajectory, dependent child, or stagger delay is pending.
Sourcepub fn completion(&mut self) -> Completion ⓘ
pub fn completion(&mut self) -> Completion ⓘ
Observes the current change; replacing it or dropping the tree cancels.
Trait Implementations§
Source§impl<K, V> Deref for MotionTreeState<K, V>
impl<K, V> Deref for MotionTreeState<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for MotionTreeState<K, V>where
MotionTree<K, V>: Freeze,
impl<K, V> RefUnwindSafe for MotionTreeState<K, V>where
MotionTree<K, V>: RefUnwindSafe,
impl<K, V> Send for MotionTreeState<K, V>where
MotionTree<K, V>: Send,
impl<K, V> Sync for MotionTreeState<K, V>where
MotionTree<K, V>: Sync,
impl<K, V> Unpin for MotionTreeState<K, V>where
MotionTree<K, V>: Unpin,
impl<K, V> UnsafeUnpin for MotionTreeState<K, V>where
MotionTree<K, V>: UnsafeUnpin,
impl<K, V> UnwindSafe for MotionTreeState<K, V>where
MotionTree<K, V>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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