makepad_objc_sys::runtime

Struct Object

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

Implementations§

Source§

impl Object

Source

pub fn class(&self) -> &Class

Returns the class of self.

Source

pub unsafe fn get_ivar<T>(&self, name: &str) -> &T
where T: Encode,

Returns a reference to the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Source

pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T
where T: Encode,

Returns a mutable reference to the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Source

pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)
where T: Encode,

Sets the value of the ivar of self with the given name. Panics if self has no ivar with the given name. Unsafe because the caller must ensure that the ivar is actually of type T.

Trait Implementations§

Source§

impl Debug for Object

Source§

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

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

impl<'a> Encode for &'a Object

Source§

fn encode() -> Encoding

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

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

Source§

fn encode() -> Encoding

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

impl Message for Object

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

Auto Trait Implementations§

§

impl Freeze for Object

§

impl RefUnwindSafe for Object

§

impl Send for Object

§

impl Sync for Object

§

impl Unpin for Object

§

impl UnwindSafe for Object

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.