Contents

withBorrowedName(body:)

Borrow access to the port name in a block that can perform non-consuming operations.

Declaration

func withBorrowedName<ReturnType>(body: (mach_port_name_t, mach_port_context_t) -> ReturnType) -> ReturnType

Discussion

Take care when using this function; many operations consume rights.

If the right is consumed, behavior is undefined.

The body block may optionally return something, which will then be returned to the caller of withBorrowedName.