[][src]Struct block::ConcreteBlock

#[repr(C)]
pub struct ConcreteBlock<A, R, F> { /* fields omitted */ }

An Objective-C block whose size is known at compile time and may be constructed on the stack.

Methods

impl<A, R, F> ConcreteBlock<A, R, F> where
    A: BlockArguments,
    F: IntoConcreteBlock<A, Ret = R>, 
[src]

pub fn new(closure: F) -> Self[src]

Constructs a ConcreteBlock with the given closure. When the block is called, it will return the value that results from calling the closure.

impl<A, R, F> ConcreteBlock<A, R, F> where
    F: 'static, 
[src]

pub fn copy(self) -> RcBlock<A, R>[src]

Copy self onto the heap as an RcBlock.

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, F> Clone for ConcreteBlock<A, R, F> where
    F: Clone
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<A, R, F> DerefMut for ConcreteBlock<A, R, F>[src]

impl<A, R, F> Deref for ConcreteBlock<A, R, F>[src]

type Target = Block<A, R>

The resulting type after dereferencing.

Auto Trait Implementations

impl<A, R, F> !Send for ConcreteBlock<A, R, F>

impl<A, R, F> !Sync for ConcreteBlock<A, R, F>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]