Struct block::RcBlock
[−]
[src]
pub struct RcBlock<A, R> { /* fields omitted */ }
A reference-counted Objective-C block.
Methods
impl<A, R> RcBlock<A, R>
[src]
unsafe fn new(ptr: *mut Block<A, R>) -> Self
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.
unsafe fn copy(ptr: *mut Block<A, R>) -> Self
Constructs an RcBlock
by copying the given block.
Unsafe because ptr
must point to a valid Block
.
Methods from Deref<Target = Block<A, R>>
unsafe fn call(&self, args: A) -> R
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]
fn clone(&self) -> RcBlock<A, R>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
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>
The method called to dereference a value