mirror of
https://github.com/Zenithsiz/dynatos.git
synced 2026-02-04 02:18:40 +00:00
Added Effect::inner_ptr.
This commit is contained in:
parent
07f249b1aa
commit
1e85e99aa0
@ -86,6 +86,13 @@ impl Effect {
|
||||
Rc::strong_count(&self.inner) == 1 && Rc::weak_count(&self.inner) == 0
|
||||
}
|
||||
|
||||
/// Returns the pointer of this effect
|
||||
///
|
||||
/// This can be used for creating maps based on equality
|
||||
pub fn inner_ptr(&self) -> *const () {
|
||||
Rc::as_ptr(&self.inner).cast()
|
||||
}
|
||||
|
||||
/// Runs the effect
|
||||
pub fn run(&self) {
|
||||
// Push the effect, run the closure and pop it
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user