[−][src]Enum fruitbasket::FruitCallbackKey
Key into the ObjC callback hash map
You can register to receive callbacks from ObjectiveC based on these keys.
Callbacks that are not tied to objects can be registered with static selector strings. For instance, if your app has registered itself as a URL handler, you would use: FruitCallbackKey::Method("handleEvent:withReplyEvent:")
Other pre-defined selectors are: FruitCallbackKey::Method("applicationWillFinishlaunching:") FruitCallbackKey::Method("applicationDidFinishlaunching:")
The Object variant is currently unused, and reserved for the future.
If the callback will be from a particular object, you use the Object type
with the ObjC object included. For example, if you want to register for
callbacks from a particular NSButton instance, you would add it to the
callback map with:
let button1: *mut Object =
Variants
Method(&'static str)
A callback tied to a generic selector
Object(*mut Object)
A callback from a specific object instance
Trait Implementations
impl Eq for FruitCallbackKey
[src]
impl Hash for FruitCallbackKey
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<FruitCallbackKey> for FruitCallbackKey
[src]
fn eq(&self, other: &FruitCallbackKey) -> bool
[src]
fn ne(&self, other: &FruitCallbackKey) -> bool
[src]
impl StructuralEq for FruitCallbackKey
[src]
impl StructuralPartialEq for FruitCallbackKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for FruitCallbackKey
impl !Send for FruitCallbackKey
impl !Sync for FruitCallbackKey
impl Unpin for FruitCallbackKey
impl UnwindSafe for FruitCallbackKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,