Skip to main content

NSObjectNSKeyValueBindingCreation

Trait NSObjectNSKeyValueBindingCreation 

Source
pub unsafe trait NSObjectNSKeyValueBindingCreation:
    ClassType
    + Sized
    + Sealed {
    // Provided methods
    fn exposeBinding(binding: &NSBindingName) { ... }
    fn exposedBindings(&self) -> Retained<NSArray<NSBindingName>> { ... }
    fn valueClassForBinding(
        &self,
        binding: &NSBindingName,
    ) -> Option<&'static AnyClass> { ... }
    unsafe fn bind_toObject_withKeyPath_options(
        &self,
        binding: &NSBindingName,
        observable: &AnyObject,
        key_path: &NSString,
        options: Option<&NSDictionary<NSBindingOption, AnyObject>>,
    ) { ... }
    fn unbind(&self, binding: &NSBindingName) { ... }
    fn infoForBinding(
        &self,
        binding: &NSBindingName,
    ) -> Option<Retained<NSDictionary<NSBindingInfoKey, AnyObject>>> { ... }
    fn optionDescriptionsForBinding(
        &self,
        binding: &NSBindingName,
    ) -> Retained<NSArray<NSAttributeDescription>> { ... }
}
Available on crate feature NSKeyValueBinding only.
Expand description

Category “NSKeyValueBindingCreation” on NSObject.

Provided Methods§

Source

fn exposeBinding(binding: &NSBindingName)

Source

fn exposedBindings(&self) -> Retained<NSArray<NSBindingName>>

Source

fn valueClassForBinding( &self, binding: &NSBindingName, ) -> Option<&'static AnyClass>

Source

unsafe fn bind_toObject_withKeyPath_options( &self, binding: &NSBindingName, observable: &AnyObject, key_path: &NSString, options: Option<&NSDictionary<NSBindingOption, AnyObject>>, )

§Safety
  • observable should be of the correct type.
  • options generic should be of the correct type.
Source

fn unbind(&self, binding: &NSBindingName)

Source

fn infoForBinding( &self, binding: &NSBindingName, ) -> Option<Retained<NSDictionary<NSBindingInfoKey, AnyObject>>>

Source

fn optionDescriptionsForBinding( &self, binding: &NSBindingName, ) -> Retained<NSArray<NSAttributeDescription>>

Available on Apple and crate feature objc2-core-data only.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl NSObjectNSKeyValueBindingCreation for NSObject

Implementors§