#[repr(C)]pub struct Block<A, R> { /* private fields */ }
Expand description
An Objective-C block that takes arguments of A
when called and
returns a value of R
.
Implementations§
source§impl<A, R> Block<A, R>where
A: BlockArguments,
impl<A, R> Block<A, R>where
A: BlockArguments,
sourcepub unsafe fn call(&self, args: A) -> R
pub 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.
Auto Trait Implementations§
impl<A, R> Freeze for Block<A, R>
impl<A, R> RefUnwindSafe for Block<A, R>
impl<A, R> !Send for Block<A, R>
impl<A, R> !Sync for Block<A, R>
impl<A, R> Unpin for Block<A, R>
impl<A, R> UnwindSafe for Block<A, R>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more