Just add the code here to your .vimrc or init.vim file.
This code will show the function signatures but just hide the code inside like so:
fn foo(
value: int
) {
+-- 19 lines: let x = vec![1, 2, 3];---------------------------------
Use zr/zm to toggle.