[−][src]Struct block::RcBlock
A reference-counted Objective-C block.
Implementations
impl<A, R> RcBlock<A, R>
[src]
pub unsafe fn new(ptr: *mut Block<A, R>) -> Self
[src]
Construct an RcBlock
for the given block without copying it.
The caller must ensure the block has a +1 reference count.
Unsafe because ptr
must point to a valid Block
and must have a +1
reference count or it will be overreleased when the RcBlock
is
dropped.
pub unsafe fn copy(ptr: *mut Block<A, R>) -> Self
[src]
Constructs an RcBlock
by copying the given block.
Unsafe because ptr
must point to a valid Block
.
Methods from Deref<Target = Block<A, R>>
pub unsafe fn call(&self, args: A) -> R
[src]
Call self with the given arguments.
Unsafe because this invokes foreign code that the caller must verify doesn't violate any of Rust's safety rules. For example, if this block is shared with multiple references, the caller must ensure that calling it will not cause a data race.
Trait Implementations
impl<A, R> Clone for RcBlock<A, R>
[src]
impl<A, R> Deref for RcBlock<A, R>
[src]
type Target = Block<A, R>
The resulting type after dereferencing.
fn deref(&self) -> &Block<A, R>
[src]
impl<A, R> Drop for RcBlock<A, R>
[src]
Auto Trait Implementations
impl<A, R> RefUnwindSafe for RcBlock<A, R>
impl<A, R> !Send for RcBlock<A, R>
impl<A, R> !Sync for RcBlock<A, R>
impl<A, R> Unpin for RcBlock<A, R>
impl<A, R> UnwindSafe for RcBlock<A, R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,