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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.