You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,7 @@ The trait provides associated types and constants to introspect function pointer
14
14
15
15
### 1. Function Pointer Metadata
16
16
17
-
Every function pointer automatically implements [`FnPtr`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.FnPtr.html).
18
-
Depending on the type, they also implement [`SafeFnPtr`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.SafeFnPtr.html), [`UnsafeFnPtr`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.UnsafeFnPtr.html), [`StaticFnPtr`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.StaticFnPtr.html) and [`HasAbi<Abi>`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.HasAbi.html).
19
-
With it you can inspect the type of function:
17
+
Every function pointer automatically implements [`FnPtr`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.FnPtr.html) as well as a bunch of other related traits. With these you can inspect the type of function pointers at compile time:
20
18
21
19
```rust
22
20
usefn_ptr::{FnPtr, Abi};
@@ -26,7 +24,7 @@ type F = extern "C" fn(i32, i32) -> i32;
Note that this does not change the underlying ABI and should be used with caution.
@@ -90,11 +88,11 @@ To implement the traits for all function pointer types, there is a large [macro]
90
88
For the conversion macros the crate relies on two traits: [`WithAbi`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.WithAbi.html) and [`WithSafety`](https://docs.rs/fn-ptr/latest/fn_ptr/trait.WithSafety.html) that can also be used directly:
0 commit comments