pub struct Subscription { /* private fields */ }Expand description
An active event subscription returned by Scene::on_* methods.
The subscription is automatically cancelled when the Subscription is
dropped. Keep it alive for as long as you need the callback to fire.
ⓘ
let _update_sub = scene.on_update(|dt| println!("frame dt={dt}"));
// subscription cancelled when _update_sub goes out of scopeTrait Implementations§
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
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