Skip to main content

## shim_sig

# Macro shim_sig

Source

    macro_rules! shim_sig {
        (extern $abi:literal fn($($args:tt)*) -> $($ret:tt)*) => { ... };
    }

Expand description

Construct a `ShimSig` with convenient syntax:

ⓘ

    shim_sig!(extern "C" fn (*const T, i32) -> usize)

The following types are supported:

- primitive integer types
- `()`
- (thin) raw pointers, written `*const _` and `*mut _` since the pointee type is irrelevant
- `$crate::$mod::...::$ty` for a type from the given crate (most commonly that is `libc`)
- `winapi::$ty` for a type from `std::sys::pal::windows::c`