[−][src]Struct objc::runtime::Object
A type that represents an instance of a class.
Methods
impl Object
[src]
pub fn class(&self) -> &Class
[src]
Returns the class of self.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &T where
T: Encode,
[src]
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
.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut T where
T: Encode,
[src]
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
.
pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T) where
T: Encode,
[src]
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
impl<'a> Encode for &'a Object
[src]
impl<'a> Encode for &'a mut Object
[src]
impl Message for Object
[src]
unsafe fn send_message<A, R>(
&self,
sel: Sel,
args: A
) -> Result<R, MessageError> where
Self: Sized,
A: MessageArguments,
R: Any,
[src]
&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
fn verify_message<A, R>(&self, sel: Sel) -> Result<(), MessageError> where
Self: Sized,
A: EncodeArguments,
R: Encode,
[src]
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
impl Debug for Object
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,