Struct block::Block [] [src]

pub struct Block<A, R> {
    // some fields omitted
}

An Objective-C block that takes arguments of A when called and returns a value of R.

Methods

impl<A: BlockArguments, R> Block<A, R> where A: BlockArguments
[src]

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.