makepad_objc_sys::runtime

Struct Class

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

Implementations§

Source§

impl Class

Source

pub fn get(name: &str) -> Option<&'static Class>

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

Source

pub fn classes() -> MallocBuffer<&'static Class>

Obtains the list of registered class definitions.

Source

pub fn classes_count() -> usize

Returns the total number of registered classes.

Source

pub fn name(&self) -> &str

Returns the name of self.

Source

pub fn superclass(&self) -> Option<&Class>

Returns the superclass of self, or None if self is a root class.

Source

pub fn metaclass(&self) -> &Class

Returns the metaclass of self.

Source

pub fn instance_size(&self) -> usize

Returns the size of instances of self.

Source

pub fn instance_method(&self, sel: Sel) -> Option<&Method>

Returns a specified instance method for self, or None if self and its superclasses do not contain an instance method with the specified selector.

Source

pub fn instance_variable(&self, name: &str) -> Option<&Ivar>

Returns the ivar for a specified instance variable of self, or None if self has no ivar with the given name.

Source

pub fn instance_methods(&self) -> MallocBuffer<&Method>

Describes the instance methods implemented by self.

Source

pub fn conforms_to(&self, proto: &Protocol) -> bool

Checks whether this class conforms to the specified protocol.

Source

pub fn adopted_protocols(&self) -> MallocBuffer<&Protocol>

Get a list of the protocols to which this class conforms.

Source

pub fn instance_variables(&self) -> MallocBuffer<&Ivar>

Describes the instance variables declared by self.

Trait Implementations§

Source§

impl Debug for Class

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Encode for &'a Class

Source§

fn encode() -> Encoding

Returns the Objective-C type encoding for Self.
Source§

impl<'a> Encode for &'a mut Class

Source§

fn encode() -> Encoding

Returns the Objective-C type encoding for Self.
Source§

impl Message for Class

Source§

unsafe fn send_message<A, R>( &self, sel: Sel, args: A, ) -> Result<R, MessageError>
where Self: Sized, A: MessageArguments, R: Any,

Sends a message to self with the given selector and arguments. Read more
Source§

fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError>
where Self: Sized, A: EncodeArguments, R: Encode,

Verifies that the argument and return types match the encoding of the method for the given selector. Read more
Source§

impl PartialEq for Class

Source§

fn eq(&self, other: &Class) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Class

Auto Trait Implementations§

§

impl Freeze for Class

§

impl RefUnwindSafe for Class

§

impl Send for Class

§

impl Sync for Class

§

impl Unpin for Class

§

impl UnwindSafe for Class

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.