Struct objc2::rc::PartialInit
source · pub struct PartialInit<T: ?Sized> { /* private fields */ }
Expand description
An Objective-C object that has been allocated and initialized in the current class, but not yet initialized in the superclass.
This is returned by Allocated::set_ivars
, and is intended to be used
further in msg_send_id!
super
calls.
§Memory layout
The memory layout of this struct is NOT currently guaranteed, as we may want to be able to move a drop flag to the stack in the future.
Implementations§
source§impl<T: ?Sized + Message> PartialInit<T>
impl<T: ?Sized + Message> PartialInit<T>
sourcepub fn as_ptr(this: &Self) -> *const T
pub fn as_ptr(this: &Self) -> *const T
Returns a raw pointer to the object.
The pointer is valid for at least as long as the PartialInit
is
held.
See PartialInit::as_mut_ptr
for the mutable equivalent.
This is an associated method, and must be called as
PartialInit::as_ptr(obj)
.
sourcepub fn as_mut_ptr(this: &mut Self) -> *mut T
pub fn as_mut_ptr(this: &mut Self) -> *mut T
Returns a raw mutable pointer to the object.
The pointer is valid for at least as long as the PartialInit
is
held.
See PartialInit::as_ptr
for the immutable equivalent.
This is an associated method, and must be called as
PartialInit::as_mut_ptr(obj)
.