[−][src]Struct block::ConcreteBlock
An Objective-C block whose size is known at compile time and may be constructed on the stack.
Implementations
impl<A, R, F> ConcreteBlock<A, R, F> where
A: BlockArguments,
F: IntoConcreteBlock<A, Ret = R>,
[src]
A: BlockArguments,
F: IntoConcreteBlock<A, Ret = R>,
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]
F: 'static,
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]
F: Clone,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<A, R, F> Deref for ConcreteBlock<A, R, F>
[src]
type Target = Block<A, R>
The resulting type after dereferencing.
fn deref(&self) -> &Block<A, R>
[src]
impl<A, R, F> DerefMut for ConcreteBlock<A, R, F>
[src]
Auto Trait Implementations
impl<A, R, F> RefUnwindSafe for ConcreteBlock<A, R, F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<A, R, F> !Send for ConcreteBlock<A, R, F>
impl<A, R, F> !Sync for ConcreteBlock<A, R, F>
impl<A, R, F> Unpin for ConcreteBlock<A, R, F> where
F: Unpin,
F: Unpin,
impl<A, R, F> UnwindSafe for ConcreteBlock<A, R, F> where
F: UnwindSafe,
F: UnwindSafe,
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>,