pub struct AnimationInstanceFactory(/* private fields */);Expand description
An animation instance on its way to the server.
An instance belongs to the server: it resolves server objects and keeps
its state in cells, so it cannot cross threads. What the UI thread
creates and a batch carries is the factory of the instance, which holds
what the instance is made of (all of it Send) and is called on the
server.
Implementations§
Source§impl AnimationInstanceFactory
impl AnimationInstanceFactory
pub fn new( create: impl FnOnce() -> Rc<dyn IAnimationInstance> + Send + 'static, ) -> Self
Sourcepub fn create(self) -> Rc<dyn IAnimationInstance>
pub fn create(self) -> Rc<dyn IAnimationInstance>
Creates the instance. Called on the thread that runs it.
Auto Trait Implementations§
impl !RefUnwindSafe for AnimationInstanceFactory
impl !Sync for AnimationInstanceFactory
impl !UnwindSafe for AnimationInstanceFactory
impl Freeze for AnimationInstanceFactory
impl Send for AnimationInstanceFactory
impl Unpin for AnimationInstanceFactory
impl UnsafeUnpin for AnimationInstanceFactory
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more