#[repr(C)]
pub struct Class { /* private fields */ }
Expand description

An Objective-C class.

See documentation.

Usage

This is an opaque type meant to be used behind a shared reference &Class, which is semantically equivalent to Class _Nonnull.

A nullable class is defined as Option<&Class>, which is semantically equivalent to Class _Nullable.

Implementations

Returns the class definition of a specified class, or None if the class is not registered with the Objective-C runtime.

Returns the number of classes registered with the Objective-C runtime.

Returns all classes registered with the Objective-C runtime.

Returns true if this class implements or inherits a method that can respond to a specified message.

See documentation.

Returns true if instances of this class implement or inherit a method that can respond to a specified message.

See documentation.

Returns the name of this class.

Returns this class’s superclass, or None if this is a root class (e.g. NSObject).

Returns an iterator over the superclasses of this class.

Returns the number of superclasses of this class.

Returns true if this class has a superclass.

Returns true if this class is a subclass of, or identical to, the other class.

Returns the size of instances of this class.

Returns a reference to the data for a class method defined by name, or None if this class or its superclasses do not implement a class method with the specified selector.

Note that this function searches superclasses for implementations, whereas copy_class_method_list does not.

See documentation.

Returns the class methods implemented by this class, or None if this class implements no instance methods.

To get the implementations of instance methods that may be implemented by superclasses, use get_class_method.

This calls class_copyMethodList on the metaclass of this class.

Returns a reference to the data for an instance method defined by name, or None if this class or its superclasses do not implement an instance method with the specified selector.

Note that this function searches superclasses for implementations, whereas copy_instance_method_list does not.

See documentation.

Returns the instance methods implemented by this class, or None if this class implements no instance methods.

To get the implementations of instance methods that may be implemented by superclasses, use get_instance_method.

See documentation.

Returns a property of self with name.

See documentation.

Returns a malloc-ed list of properties declared by self.

Any properties declared by superclasses are not included.

See documentation.

Trait Implementations

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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.