[−][src]Function swipc_gen::gen_rust_code::format_ret_ty
fn format_ret_ty(
ret: &[(Alias, Option<String>)],
server: bool
) -> Result<String, Error>
Format the return type of a function.
- If there's 0 return types, then the return type will be ().
- If there's only 1 return type, then that type will be passed directly as the return type.
- If there's 2 or more arguments, then the return type will be a tuple of those types.
IPC Buffers are skipped from the return types, since they are handled by the argument formatter instead. Buffers are passed as mutable reference arguments.
See get_type to find the mapping of a SwIPC type to a Rust type.