Try this - i have made your one-liner a multi-liner, btw., because it is easier to keep track of. You can convert it into a - quite unreadable - one-liner again, if you insist in unintelligible code.
sed '/public func/ {
h
s/^[[:blank:]]*//\/\/\//
s/\([^)]*)\).*/\1/p
s/^\/\/\//\/\/==mark==/p
g
}' /path/to/file
Here is a version with commentary:
sed '/public func/ { # for every line with "pub..." do:
h # copy line to hold space
s/^[[:blank:]]*//\/\/\// # replace leading blanks (if any) with three slashes
s/\([^)]*)\).*/\1/p # remove everything after first ")" and print the result
s/^\/\/\//\/\/==mark==/p # replace leading "///" with "//==mark==" and print again
g # copy hold space (original line) back to pattern space
}'
Notice that " sed -i " is a GNU-speciality and is not recommended to use. Instead write to a temporary file and move this over the original (once you are satisfied). sed -i does the same, but behind your back and in case something goes wrong you have less options to troubleshoot that.