pub trait PNSObject {
Show 17 methods
// Required methods
fn m_class<'a>() -> &'a Class;
fn m_self(&self) -> id;
// Provided methods
fn m_new() -> Self
where Self: Sized + FromId { ... }
fn m_alloc() -> Self
where Self: Sized + FromId { ... }
fn m_initialize() { ... }
fn ip_superclass<'a>() -> Option<&'a Class> { ... }
fn m_is_equal(&self, object: &Self) -> bool { ... }
fn p_hash(&self) -> UInt { ... }
fn m_is_kind_of_class(&self, class: Class) -> bool { ... }
fn m_is_member_of_class(&self, class: Class) -> bool { ... }
fn m_responds_to_selector(&self, selector: Sel) -> bool { ... }
fn m_conforms_to_protocol(&self, protocol: Protocol) -> bool { ... }
fn p_description(&self) -> NSString { ... }
fn p_debug_description(&self) -> NSString { ... }
fn m_perform_selector(&self, selector: Sel) -> id { ... }
fn m_perform_selector_with_object(
&self,
selector: Sel,
with_object: id,
) -> id { ... }
fn m_is_proxy(&self) -> bool { ... }
}
Expand description
The group of methods that are fundamental to all Objective-C objects.
Required Methods§
Provided Methods§
Sourcefn m_new() -> Self
fn m_new() -> Self
Allocates a new instance of the receiving class, sends it an init message, and returns the initialized object.
Sourcefn m_initialize()
fn m_initialize()
Initializes the class before it receives its first message.
Sourcefn ip_superclass<'a>() -> Option<&'a Class>
fn ip_superclass<'a>() -> Option<&'a Class>
Returns the class object for the receiver’s superclass.
Sourcefn m_is_equal(&self, object: &Self) -> bool
fn m_is_equal(&self, object: &Self) -> bool
Returns a Boolean value that indicates whether the receiver and a given object are equal.
Sourcefn p_hash(&self) -> UInt
fn p_hash(&self) -> UInt
Returns an integer that can be used as a table address in a hash table structure.
Sourcefn m_is_kind_of_class(&self, class: Class) -> bool
fn m_is_kind_of_class(&self, class: Class) -> bool
Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherits from that class.
Sourcefn m_is_member_of_class(&self, class: Class) -> bool
fn m_is_member_of_class(&self, class: Class) -> bool
Returns a Boolean value that indicates whether the receiver is an instance of a given class.
Sourcefn m_responds_to_selector(&self, selector: Sel) -> bool
fn m_responds_to_selector(&self, selector: Sel) -> bool
Returns a Boolean value that indicates whether the receiver implements or inherits a method that can respond to a specified message.
Sourcefn m_conforms_to_protocol(&self, protocol: Protocol) -> bool
fn m_conforms_to_protocol(&self, protocol: Protocol) -> bool
Returns a Boolean value that indicates whether the receiver conforms to a given protocol.
Sourcefn p_description(&self) -> NSString
fn p_description(&self) -> NSString
A textual representation of the receiver.
Sourcefn p_debug_description(&self) -> NSString
fn p_debug_description(&self) -> NSString
A textual representation of the receiver to use with a debugger.
Sourcefn m_perform_selector(&self, selector: Sel) -> id
fn m_perform_selector(&self, selector: Sel) -> id
Sends a specified message to the receiver and returns the result of the message.
Sourcefn m_perform_selector_with_object(&self, selector: Sel, with_object: id) -> id
fn m_perform_selector_with_object(&self, selector: Sel, with_object: id) -> id
Sends a message to the receiver with an object as the argument.
Sourcefn m_is_proxy(&self) -> bool
fn m_is_proxy(&self) -> bool
Returns a Boolean value that indicates whether the receiver does not descend from NSObject.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.