pub struct RcBlock<A, R> { /* private fields */ }
Expand description

A reference-counted Objective-C block.

Implementations

Construct an RcBlock for the given block without copying it. The caller must ensure the block has a +1 reference count.

Safety

The given pointer must point to a valid Block and must have a +1 reference count or it will be overreleased when the RcBlock is dropped.

Constructs an RcBlock by copying the given block.

Safety

The given pointer must point to a valid Block.

Methods from Deref<Target = Block<A, R>>

Call self with the given arguments.

Safety

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.