Struct cacao::utils::properties::ObjcProperty
source · [−]pub struct ObjcProperty(_);
Expand description
A wrapper for single-threaded ObjcProperty
types.
An ObjcProperty
is something that exists on the Objective-C side that we want to interact with, and
support cloning with respect to our side and the general Rust rules. Thus, we do a layer of
Rc/RefCell to shield things and make life easier.
It is possible we could remove the Id
wrapper in here if we’re just doing this ourselves, and
is probably worth investigating at some point.
Implementations
sourceimpl ObjcProperty
impl ObjcProperty
sourcepub fn retain(obj: id) -> Self
pub fn retain(obj: id) -> Self
Given an Objective-C object, retains it and wraps it as a Property
.
sourcepub fn from_retained(obj: id) -> Self
pub fn from_retained(obj: id) -> Self
Given an Objective-C object, retains it and wraps it as a Property
.
Trait Implementations
sourceimpl Clone for ObjcProperty
impl Clone for ObjcProperty
sourcefn clone(&self) -> ObjcProperty
fn clone(&self) -> ObjcProperty
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ObjcProperty
impl !Send for ObjcProperty
impl !Sync for ObjcProperty
impl Unpin for ObjcProperty
impl !UnwindSafe for ObjcProperty
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more