#[repr(C)]pub struct BlockLiteral<Closure> {
pub isa: *const c_void,
pub flags: i32,
pub reserved: i32,
pub invoke: *const c_void,
pub descriptor: *const c_void,
pub closure: Closure,
}Expand description
Block literal structure matching Clang’s Block_literal_1.
This is the actual block object passed to Objective-C APIs. The layout must exactly match what Clang generates.
Fields§
§isa: *const c_voidISA pointer - points to _NSConcreteStackBlock or _NSConcreteGlobalBlock.
flags: i32Block flags.
reserved: i32Reserved (always 0).
invoke: *const c_voidInvoke function pointer - the actual function to call.
descriptor: *const c_voidPointer to the block descriptor.
closure: ClosureCaptured closure data.
Auto Trait Implementations§
impl<Closure> Freeze for BlockLiteral<Closure>where
Closure: Freeze,
impl<Closure> RefUnwindSafe for BlockLiteral<Closure>where
Closure: RefUnwindSafe,
impl<Closure> !Send for BlockLiteral<Closure>
impl<Closure> !Sync for BlockLiteral<Closure>
impl<Closure> Unpin for BlockLiteral<Closure>where
Closure: Unpin,
impl<Closure> UnwindSafe for BlockLiteral<Closure>where
Closure: UnwindSafe,
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