pub struct Action(_);
Available on crate feature
appkit
only.Expand description
An Action is just an indirection layer to get around Rust and optimizing zero-sum types; without this, pointers to callbacks will end up being 0x1, and all point to whatever is there first (unsure if this is due to Rust or Cocoa or what).
Point is, Button aren’t created that much in the grand scheme of things, and the heap isn’t our enemy in a GUI framework anyway. If someone knows a better way to do this that doesn’t require double-boxing, I’m all ears.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Action
impl !Send for Action
impl !Sync for Action
impl Unpin for Action
impl !UnwindSafe for Action
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more